Skip to content

Commit

Permalink
Update test.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus authored Jan 7, 2024
1 parent e2b62a7 commit 6fb2a08
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,15 @@ test('handle negative millisecond values', t => {
});

test('errors', t => {
t.throws(() => parseMilliseconds('string'));
t.throws(() => parseMilliseconds(Number.NaN));
t.throws(() => parseMilliseconds(Number.POSITIVE_INFINITY));
t.throws(() => {
parseMilliseconds('string');
});

t.throws(() => {
parseMilliseconds(Number.NaN);
});

t.throws(() => {
parseMilliseconds(Number.POSITIVE_INFINITY);
});
});

0 comments on commit 6fb2a08

Please sign in to comment.