Skip to content

Commit c520353

Browse files
committed
chore: add numbers tests;
- related #23
1 parent 03e1cf9 commit c520353

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎test/index.js‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ test('strings (variadic)', () => {
2828
assert.is(fn(false && 'foo', 'bar', 'baz', ''), 'bar baz');
2929
});
3030

31+
test('numbers', () => {
32+
assert.is(fn(1), '1');
33+
assert.is(fn(12), '12');
34+
assert.is(fn(0.1), '0.1');
35+
assert.is(fn(0), '');
36+
37+
assert.is(fn(Infinity), 'Infinity');
38+
assert.is(fn(NaN), '');
39+
});
40+
41+
test('numbers (variadic)', () => {
42+
assert.is(fn(0, 1), '1');
43+
assert.is(fn(1, 2), '1 2');
44+
});
45+
3146
test('objects', () => {
3247
assert.is(fn({}), '');
3348
assert.is(fn({ foo:true }), 'foo');

0 commit comments

Comments
 (0)