From c520353bd6ffcd101392e4134ad16121fc6b98d2 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Sat, 15 Jul 2023 16:31:43 -0700 Subject: [PATCH] chore: add `numbers` tests; - related #23 --- test/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/index.js b/test/index.js index 47a3834..5fd9dec 100644 --- a/test/index.js +++ b/test/index.js @@ -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');