LibJS: Stop tracking whether execution context is strict mode or not

This was only used for basic testing, and forced us to plumb this flag
flag in a bunch of places.
This commit is contained in:
Andreas Kling 2025-10-28 21:16:35 +01:00 committed by Andreas Kling
parent fb05063dde
commit fdb85a330e
Notes: github-actions[bot] 2025-10-29 20:22:21 +00:00
19 changed files with 4 additions and 320 deletions

View file

@ -110,33 +110,6 @@ test("arrow functions in objects", () => {
expect(foobar.x.z()).toBe(foobar.x);
});
test("strict mode propagation", () => {
(() => {
"use strict";
expect(isStrictMode()).toBeTrue();
(() => {
expect(isStrictMode()).toBeTrue();
})();
})();
(() => {
"use strict";
expect(isStrictMode()).toBeTrue();
})();
(() => {
expect(isStrictMode()).toBeFalse();
(() => {
"use strict";
expect(isStrictMode()).toBeTrue();
})();
expect(isStrictMode()).toBeFalse();
})();
});
test("no prototype", () => {
let foo = () => {};
expect(foo).not.toHaveProperty("prototype");