From f3693674f691f08d2b01c73de26992a1f9c7f1ff Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 17 Oct 2022 17:51:49 +0700 Subject: [PATCH] Add failing test for #174 --- test/test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test.ts b/test/test.ts index f9334ee..4343fcf 100644 --- a/test/test.ts +++ b/test/test.ts @@ -1435,6 +1435,17 @@ test('is.nonEmptyArray', t => { t.throws(() => { assert.nonEmptyArray(new Array()); // eslint-disable-line @typescript-eslint/no-array-constructor }); + + // https://github.com/sindresorhus/is/issues/174 + // { + // const strings = ['foo', 'bar'] + // const function_ = (value: string) => value; + + // if (is.nonEmptyArray(strings)) { + // const value = strings[0] + // function_(value); + // } + // } }); test('is.emptyString', t => {