Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Nov 12, 2018
1 parent 8c88645 commit f185a0e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/errname.js
Expand Up @@ -9,10 +9,10 @@ const fallback = code => errname.__test__(null, code);
function makeTests(name, m, expected) {
test(`${name}: >=0 exit codes`, t => {
// Throws >= 0
t.throws(() => m(0), /err >= 0|It must be a negative integer/);
t.throws(() => m(1), /err >= 0|It must be a negative integer/);
t.throws(() => m('2'), /err >= 0|must be of type number/);
t.throws(() => m('foo'), /err >= 0|must be of type number/);
t.throws(() => m(0), /err >= 0|It must be a negative integer|must be of type negative number/);
t.throws(() => m(1), /err >= 0|It must be a negative integer|must be of type negative number/);
t.throws(() => m('2'), /err >= 0|must be of type number|must be of type negative number/);
t.throws(() => m('foo'), /err >= 0|must be of type number|must be of type negative number/);
});

test(`${name}: negative exit codes`, t => {
Expand Down

0 comments on commit f185a0e

Please sign in to comment.