Permalink
Browse files

test: check for error on invalid signal

Asserts that an error should be thrown when
an invalid signal is passed to process.kill().

PR-URL: #10026
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
mattcphillips authored and Trott committed Dec 1, 2016
1 parent 444b907 commit 6aacef730096fc2b5850acec7ed280c396124e95
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/parallel/test-process-kill-pid.js
@@ -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

0 comments on commit 6aacef7

Please sign in to comment.