Everywhere: Hoist the Libraries folder to the top-level

This commit is contained in:
Timothy Flynn
2024-11-09 12:25:08 -05:00
committed by Andreas Kling
parent 950e819ee7
commit 93712b24bf
4547 changed files with 104 additions and 113 deletions

View File

@@ -0,0 +1,26 @@
test("basic functionality", () => {
expect(void "").toBeUndefined();
expect(void "foo").toBeUndefined();
expect(void 1).toBeUndefined();
expect(void 42).toBeUndefined();
expect(void true).toBeUndefined();
expect(void false).toBeUndefined();
expect(void null).toBeUndefined();
expect(void undefined).toBeUndefined();
expect(void function () {}).toBeUndefined();
expect(void (() => {})).toBeUndefined();
expect(void (() => "hello friends")()).toBeUndefined();
expect((() => void "hello friends")()).toBeUndefined();
});
describe("errors", () => {
test("treats yield in generator as non variable", () => {
expect("function f() { void yield; }").toEval();
expect("async function f() { void yield; }").toEval();
expect("function *f() { void yield; }").not.toEval();
expect("async function *f() { void yield; }").not.toEval();
expect("class C { *f() { void yield; } }").not.toEval();
expect("var obj = { async function *f() { void yield; } }").not.toEval();
});
});