diff --git a/test/built-ins/RegExp/named-groups/non-unicode-malformed.js b/test/built-ins/RegExp/named-groups/non-unicode-malformed.js
index 993ff17616..74d319a6a2 100644
--- a/test/built-ins/RegExp/named-groups/non-unicode-malformed.js
+++ b/test/built-ins/RegExp/named-groups/non-unicode-malformed.js
@@ -23,6 +23,7 @@ assert(/\k eval("/(?.)\\k/"));
assert.throws(SyntaxError, () => eval("/(?.)\\k eval("/(?.)\\k<>/"));
assert.throws(SyntaxError, () => eval("/(?.)\\k/"));
assert.throws(SyntaxError, () => eval("/(?a)\\k/"));
assert.throws(SyntaxError, () => eval("/(?a)\\k/"));
diff --git a/test/built-ins/RegExp/named-groups/unicode-malformed.js b/test/built-ins/RegExp/named-groups/unicode-malformed.js
index 33a09a2689..5c9c131a48 100644
--- a/test/built-ins/RegExp/named-groups/unicode-malformed.js
+++ b/test/built-ins/RegExp/named-groups/unicode-malformed.js
@@ -16,9 +16,11 @@ assert.throws(SyntaxError, () => eval("/(?a)(?a)/u"), "Duplicate name");
assert.throws(SyntaxError, () => eval("/(?a)(?b)(?a)/u"), "Duplicate name");
assert.throws(SyntaxError, () => eval("/\\k/u"), "Invalid reference");
assert.throws(SyntaxError, () => eval("/\\k eval("/\\k<>/u"), "Empty reference");
assert.throws(SyntaxError, () => eval("/\\k/u"), "Lone \k");
assert.throws(SyntaxError, () => eval("/(?.)\\k/u"), "Lone \k");
assert.throws(SyntaxError, () => eval("/(?.)\\k eval("/(?.)\\k<>/u"), "Empty reference");
assert.throws(SyntaxError, () => eval("/(?.)\\k/u"), "Invalid reference");
assert.throws(SyntaxError, () => eval("/(?a)\\k/u"), "Invalid reference");
assert.throws(SyntaxError, () => eval("/(?a)\\k/u"), "Invalid reference");