mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibJS: Reorganize tests into subfolders
This commit is contained in:
committed by
Andreas Kling
parent
21064a1883
commit
4c48c9d69d
Notes:
sideshowbarker
2024-07-19 05:13:22 +09:00
Author: https://github.com/mattco98 Commit: https://github.com/SerenityOS/serenity/commit/4c48c9d69d3 Pull-request: https://github.com/SerenityOS/serenity/pull/2681 Reviewed-by: https://github.com/linusg
20
Libraries/LibJS/Tests/operators/void-basic.js
Normal file
20
Libraries/LibJS/Tests/operators/void-basic.js
Normal file
@@ -0,0 +1,20 @@
|
||||
load("test-common.js");
|
||||
|
||||
try {
|
||||
assert(void "" === undefined);
|
||||
assert(void "foo" === undefined);
|
||||
assert(void 1 === undefined);
|
||||
assert(void 42 === undefined);
|
||||
assert(void true === undefined);
|
||||
assert(void false === undefined);
|
||||
assert(void null === undefined);
|
||||
assert(void undefined === undefined);
|
||||
assert(void function () {} === undefined);
|
||||
assert(void (() => {}) === undefined);
|
||||
assert(void (() => "hello friends")() === undefined);
|
||||
assert((() => void "hello friends")() === undefined);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
}
|
||||
Reference in New Issue
Block a user