LibJS: Enable now working tests for duplicated variable declarations

This commit is contained in:
davidot 2021-10-07 01:08:19 +02:00 committed by Linus Groh
commit 10bf91a293
Notes: sideshowbarker 2024-07-18 02:21:32 +09:00
2 changed files with 24 additions and 6 deletions

View file

@ -15,3 +15,21 @@ test("basic functionality", () => {
}
expect(caught_exception).not.toBeUndefined();
});
test("Issue #8198 arrow function escapes function scope", () => {
const b = 3;
function f() {
expect(b).toBe(3);
(() => {
expect(b).toBe(3);
var a = "wat";
eval("var b=a;");
expect(b).toBe("wat");
})();
expect(b).toBe(3);
}
f();
expect(b).toBe(3);
});