Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jun 11, 2019
1 parent 0c3138d commit e754215
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,13 @@ if (process.platform !== 'win32') {
test('.kill() `forceKillAfter` should not be a float', t => {
t.throws(() => {
execa('noop').kill('SIGTERM', {forceKillAfter: 0.5});
}, TypeError);
}, {instanceOf: TypeError, message: /non-negative integer/});
});

test('.kill() `forceKillAfter` should not be negative', t => {
t.throws(() => execa('noop').kill('SIGTERM', {forceKillAfter: -1}), TypeError);
t.throws(() => {
execa('noop').kill('SIGTERM', {forceKillAfter: -1});
}, {instanceOf: TypeError, message: /non-negative integer/});
});
}

Expand Down

0 comments on commit e754215

Please sign in to comment.