Skip to content

Commit

Permalink
test: check for error on invalid signal
Browse files Browse the repository at this point in the history
Asserts that an error should be thrown when
an invalid signal is passed to process.kill
  • Loading branch information
mattcphillips committed Dec 4, 2016
1 parent 5486867 commit 5fdea9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/parallel/test-process-kill-pid.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ assert.throws(function() { process.kill(+'not a number'); }, TypeError);
assert.throws(function() { process.kill(1 / 0); }, TypeError);
assert.throws(function() { process.kill(-1 / 0); }, TypeError);

// Test that kill throws an error for invalid signal

assert.throws(function() { process.kill(1, 'test'); }, Error);

// Test kill argument processing in valid cases.
//
// Monkey patch _kill so that we don't actually send any signals, particularly
Expand Down

0 comments on commit 5fdea9d

Please sign in to comment.