Add failing test for #174

This commit is contained in:
Sindre Sorhus 2022-10-17 17:51:49 +07:00
parent 911f44dc36
commit f3693674f6

View file

@ -1435,6 +1435,17 @@ test('is.nonEmptyArray', t => {
t.throws(() => { t.throws(() => {
assert.nonEmptyArray(new Array()); // eslint-disable-line @typescript-eslint/no-array-constructor 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 => { test('is.emptyString', t => {