From f7b15e18d4a6d13678bc183b769f02ff2914047b Mon Sep 17 00:00:00 2001 From: Aleksey Shvayka Date: Mon, 26 Jun 2017 18:57:19 +0300 Subject: [PATCH] add empty replace test --- test/built-ins/RegExp/named-groups/string-replace-unclosed.js | 2 ++ 1 file changed, 2 insertions(+) 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"); }