mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:27:35 +00:00
LibJS: Reorganize tests into subfolders
This commit is contained in:
parent
21064a1883
commit
4c48c9d69d
213 changed files with 10 additions and 2 deletions
28
Libraries/LibJS/Tests/builtins/functions/isNaN.js
Normal file
28
Libraries/LibJS/Tests/builtins/functions/isNaN.js
Normal file
|
@ -0,0 +1,28 @@
|
|||
load("test-common.js");
|
||||
|
||||
try {
|
||||
assert(isNaN.length === 1);
|
||||
|
||||
assert(isNaN(0) === false);
|
||||
assert(isNaN(42) === false);
|
||||
assert(isNaN("") === false);
|
||||
assert(isNaN("0") === false);
|
||||
assert(isNaN("42") === false);
|
||||
assert(isNaN(true) === false);
|
||||
assert(isNaN(false) === false);
|
||||
assert(isNaN(null) === false);
|
||||
assert(isNaN([]) === false);
|
||||
assert(isNaN(Infinity) === false);
|
||||
assert(isNaN(-Infinity) === false);
|
||||
|
||||
assert(isNaN() === true);
|
||||
assert(isNaN(NaN) === true);
|
||||
assert(isNaN(undefined) === true);
|
||||
assert(isNaN("foo") === true);
|
||||
assert(isNaN({}) === true);
|
||||
assert(isNaN([1, 2, 3]) === true);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e.message);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue