diff --git a/test/built-ins/RegExp/named-groups/string-replace-unclosed.js b/test/built-ins/RegExp/named-groups/string-replace-unclosed.js index 588bc3ed85..1952b85050 100644 --- a/test/built-ins/RegExp/named-groups/string-replace-unclosed.js +++ b/test/built-ins/RegExp/named-groups/string-replace-unclosed.js @@ -21,4 +21,6 @@ for (let flags of ["", "u", "g", "gu"]) { let re = new RegExp(source, flags); assert.throws(SyntaxError, () => "abcd".replace(re, "$ "abcd".replace(re, "$<>"), + "empty named group in replacement should throw a SyntaxError"); }