Update test.ts
This commit is contained in:
parent
4248929445
commit
6999b8eea1
1 changed files with 5 additions and 3 deletions
|
|
@ -1440,16 +1440,18 @@ test('is.nonEmptyStringAndNotWhitespace', t => {
|
||||||
t.false(is.nonEmptyStringAndNotWhitespace(' '));
|
t.false(is.nonEmptyStringAndNotWhitespace(' '));
|
||||||
t.true(is.nonEmptyStringAndNotWhitespace('🦄'));
|
t.true(is.nonEmptyStringAndNotWhitespace('🦄'));
|
||||||
|
|
||||||
for (const el of [null, undefined, 5, NaN, {}, []]) {
|
for (const value of [null, undefined, 5, NaN, {}, []]) {
|
||||||
t.false(is.nonEmptyStringAndNotWhitespace(el));
|
t.false(is.nonEmptyStringAndNotWhitespace(value));
|
||||||
|
|
||||||
t.throws(() => {
|
t.throws(() => {
|
||||||
assert.nonEmptyStringAndNotWhitespace(el);
|
assert.nonEmptyStringAndNotWhitespace(value);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
t.throws(() => {
|
t.throws(() => {
|
||||||
assert.nonEmptyStringAndNotWhitespace('');
|
assert.nonEmptyStringAndNotWhitespace('');
|
||||||
});
|
});
|
||||||
|
|
||||||
t.notThrows(() => {
|
t.notThrows(() => {
|
||||||
assert.nonEmptyStringAndNotWhitespace('🦄');
|
assert.nonEmptyStringAndNotWhitespace('🦄');
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue