From 7a4aa7d5b33597db0c163642309bb77c3d04d435 Mon Sep 17 00:00:00 2001 From: Josh Date Date: Thu, 18 Mar 2021 17:15:43 -0700 Subject: [PATCH 1/2] tests: test string variadic w/ actual variable string args --- test/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/index.js b/test/index.js index b4e6b2f..1e07db8 100644 --- a/test/index.js +++ b/test/index.js @@ -17,9 +17,9 @@ test('strings', t => { test('strings (variadic)', t => { t.is(fn(''), ''); - t.is(fn('foo'), 'foo'); - t.is(fn(true && 'foo'), 'foo'); - t.is(fn(false && 'foo'), ''); + t.is(fn('foo', 'bar'), 'foo bar'); + t.is(fn(true && 'foo', false && bar, 'baz'), 'foo baz'); + t.is(fn(false && 'foo', 'bar', 'baz', ''), 'bar baz'); t.end(); }); From 62a7d222b0aa3e0a6db6e8a04dd2e71e693db98a Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Thu, 18 Mar 2021 17:46:47 -0700 Subject: [PATCH 2/2] fix(test): prevent syntax error --- test/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.js b/test/index.js index 1e07db8..8be66cc 100644 --- a/test/index.js +++ b/test/index.js @@ -18,7 +18,7 @@ test('strings', t => { test('strings (variadic)', t => { t.is(fn(''), ''); t.is(fn('foo', 'bar'), 'foo bar'); - t.is(fn(true && 'foo', false && bar, 'baz'), 'foo baz'); + t.is(fn(true && 'foo', false && 'bar', 'baz'), 'foo baz'); t.is(fn(false && 'foo', 'bar', 'baz', ''), 'bar baz'); t.end(); });