diff options
Diffstat (limited to 'harness')
-rw-r--r-- | harness/typeCoercion.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/harness/typeCoercion.js b/harness/typeCoercion.js index ed03805d7..26599d216 100644 --- a/harness/typeCoercion.js +++ b/harness/typeCoercion.js @@ -323,6 +323,24 @@ function testNotCoercibleToString(test) { testNotCoercibleToPrimitive("string", test); } +function testCoercibleToBooleanTrue(test) { + test(true); + test(1); + test("string"); + test(Symbol("1")); + test({}); +} + +function testCoercibleToBooleanFalse(test) { + test(undefined); + test(null); + test(false); + test(0); + test(-0); + test(NaN); + test(""); +} + function testCoercibleToBigIntZero(test) { function testPrimitiveValue(value) { test(value); |