1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:48:11 +00:00

LibJS: Disallow 'with' statement in strict mode

This commit is contained in:
Linus Groh 2020-11-28 19:17:33 +00:00 committed by Andreas Kling
parent 42b1b36eb4
commit 3ac7fb9f6c
2 changed files with 6 additions and 0 deletions

View file

@ -18,3 +18,7 @@ test("basic with statement functionality", () => {
expect(bar).toBe(99);
});
test("syntax error in strict mode", () => {
expect("'use strict'; with (foo) {}").not.toEval();
});