From 6999b8eea1dac2689f5f8f8b898b34f4d52c7375 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 25 Feb 2022 16:09:36 +0700 Subject: [PATCH] Update test.ts --- test/test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test.ts b/test/test.ts index 6284e99..7fb01f8 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1440,16 +1440,18 @@ test('is.nonEmptyStringAndNotWhitespace', t => { t.false(is.nonEmptyStringAndNotWhitespace(' ')); t.true(is.nonEmptyStringAndNotWhitespace('🦄')); - for (const el of [null, undefined, 5, NaN, {}, []]) { - t.false(is.nonEmptyStringAndNotWhitespace(el)); + for (const value of [null, undefined, 5, NaN, {}, []]) { + t.false(is.nonEmptyStringAndNotWhitespace(value)); + t.throws(() => { - assert.nonEmptyStringAndNotWhitespace(el); + assert.nonEmptyStringAndNotWhitespace(value); }); } t.throws(() => { assert.nonEmptyStringAndNotWhitespace(''); }); + t.notThrows(() => { assert.nonEmptyStringAndNotWhitespace('🦄'); });