summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Tests
diff options
context:
space:
mode:
authorJack Karamanian <karamanian.jack@gmail.com>2020-04-06 22:48:47 -0500
committerAndreas Kling <kling@serenityos.org>2020-04-07 08:41:25 +0200
commit57bd194e5a11ae6bc8477eb976fb7d2c1e10ac35 (patch)
treec441aaa117f620dfeb9da7529497702341e91aef /Libraries/LibJS/Tests
parent4a9485f830c1134177cbd066fdeb24458d1ec4d0 (diff)
downloadserenity-57bd194e5a11ae6bc8477eb976fb7d2c1e10ac35.zip
LibJS: Return false for NaN numbers in Value::to_boolean()
Diffstat (limited to 'Libraries/LibJS/Tests')
-rw-r--r--Libraries/LibJS/Tests/NaN-basic.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibJS/Tests/NaN-basic.js b/Libraries/LibJS/Tests/NaN-basic.js
index b9a02bc425..17b51711d6 100644
--- a/Libraries/LibJS/Tests/NaN-basic.js
+++ b/Libraries/LibJS/Tests/NaN-basic.js
@@ -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);