assertType handles multipleValues rather than caller
This commit is contained in:
parent
5b13eeedda
commit
773a1cfb74
2 changed files with 26 additions and 6 deletions
14
test/test.ts
14
test/test.ts
|
|
@ -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 => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue