diff options
author | Jack Karamanian <karamanian.jack@gmail.com> | 2020-04-06 22:48:47 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-07 08:41:25 +0200 |
commit | 57bd194e5a11ae6bc8477eb976fb7d2c1e10ac35 (patch) | |
tree | c441aaa117f620dfeb9da7529497702341e91aef /Libraries/LibJS/Tests | |
parent | 4a9485f830c1134177cbd066fdeb24458d1ec4d0 (diff) | |
download | serenity-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.js | 3 |
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); |