mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:38:11 +00:00
LibJS: Return false for NaN numbers in Value::to_boolean()
This commit is contained in:
parent
4a9485f830
commit
57bd194e5a
2 changed files with 6 additions and 0 deletions
|
@ -10,6 +10,9 @@ try {
|
|||
assert(isNaN(undefined) === true);
|
||||
assert(isNaN(null) === false);
|
||||
assert(isNaN(Infinity) === false);
|
||||
assert(!!NaN === false);
|
||||
assert(!!nan === false);
|
||||
|
||||
console.log("PASS");
|
||||
} catch (e) {
|
||||
console.log("FAIL: " + e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue