Fix passing in assertion message to assertArray (#210)

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
This commit is contained in:
Martin Eneqvist 2024-09-06 17:52:56 +02:00 committed by GitHub
parent ab85d9bca9
commit 5565c5e3ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -773,6 +773,10 @@ test('is.array', t => {
x[0]?.toFixed(0);
}
});
t.throws(() => {
assert.array([1, '2'], assert.number, 'Expected numbers');
}, {message: /Expected numbers/});
});
test('is.function', t => {