mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
Everywhere: Hoist the Libraries folder to the top-level
This commit is contained in:
committed by
Andreas Kling
parent
950e819ee7
commit
93712b24bf
Notes:
github-actions[bot]
2024-11-10 11:51:52 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/93712b24bf2 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2256 Reviewed-by: https://github.com/sideshowbarker
26
Libraries/LibJS/Tests/operators/void-basic.js
Normal file
26
Libraries/LibJS/Tests/operators/void-basic.js
Normal 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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user