Skip to content

Commit e4fd367

Browse files
committed
add more examples to tests
1 parent ad8d221 commit e4fd367

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

src/typeGuards.test.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,27 @@ describe('typeGuards', () => {
3636
});
3737

3838
describe('isTruthy', () => {
39-
assertTrue(isTruthy, [true, 1, -1, ' ', '0', 'false', [], {}]);
40-
assertFalse(isTruthy, [null, undefined, false, 0, -0, '', document.all]);
39+
assertTrue(isTruthy, [
40+
true,
41+
1,
42+
-1,
43+
Infinity,
44+
' ',
45+
'0',
46+
'false',
47+
[],
48+
{},
49+
document,
50+
]);
51+
assertFalse(isTruthy, [
52+
null,
53+
undefined,
54+
false,
55+
0,
56+
-0,
57+
NaN,
58+
'',
59+
document.all,
60+
]);
4161
});
4262
});

0 commit comments

Comments
 (0)