added test coverage
This commit is contained in:
parent
c3605150a9
commit
9f59fee0d9
1 changed files with 7 additions and 0 deletions
|
|
@ -1440,6 +1440,13 @@ 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));
|
||||
t.throws(() => {
|
||||
assert.nonEmptyStringAndNotWhitespace(el);
|
||||
});
|
||||
}
|
||||
|
||||
t.throws(() => {
|
||||
assert.nonEmptyStringAndNotWhitespace('');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue