diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/template-literals.js')
-rw-r--r-- | Userland/Libraries/LibJS/Tests/template-literals.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/template-literals.js b/Userland/Libraries/LibJS/Tests/template-literals.js index 07d81509a8..985be79fa1 100644 --- a/Userland/Libraries/LibJS/Tests/template-literals.js +++ b/Userland/Libraries/LibJS/Tests/template-literals.js @@ -63,3 +63,9 @@ test("line continuation in literals (not characters)", () => { test("reference error from expressions", () => { expect(() => `${b}`).toThrowWithMessage(ReferenceError, "'b' is not defined"); }); + +test("invalid escapes should give syntax error", () => { + expect("`\\u`").not.toEval(); + expect("`\\01`").not.toEval(); + expect("`\\u{10FFFFF}`").not.toEval(); +}); |