assertType handles multipleValues rather than caller

This commit is contained in:
Dave Cohen 2021-04-21 12:05:50 -05:00
parent 5b13eeedda
commit 773a1cfb74
2 changed files with 26 additions and 6 deletions

View file

@ -1591,6 +1591,20 @@ test('is.all', t => {
t.throws(() => {
assert.all(is.string);
});
t.throws(() => {
assert.all(is.string, 1, 2, 3);
}, {
// Removes duplicates:
message: /received values of types `number`./
});
t.throws(() => {
assert.all(is.string, 1, [4]);
}, {
// Lists all types:
message: /received values of types `number`, `Array`./
});
});
test('assert', t => {