Skip to content

Commit

Permalink
chore: add numbers tests;
Browse files Browse the repository at this point in the history
- related #23
  • Loading branch information
lukeed committed Jul 15, 2023
1 parent 03e1cf9 commit c520353
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/index.js
Expand Up @@ -28,6 +28,21 @@ test('strings (variadic)', () => {
assert.is(fn(false && 'foo', 'bar', 'baz', ''), 'bar baz');
});

test('numbers', () => {
assert.is(fn(1), '1');
assert.is(fn(12), '12');
assert.is(fn(0.1), '0.1');
assert.is(fn(0), '');

assert.is(fn(Infinity), 'Infinity');
assert.is(fn(NaN), '');
});

test('numbers (variadic)', () => {
assert.is(fn(0, 1), '1');
assert.is(fn(1, 2), '1 2');
});

test('objects', () => {
assert.is(fn({}), '');
assert.is(fn({ foo:true }), 'foo');
Expand Down

0 comments on commit c520353

Please sign in to comment.