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: https://github.com/nodejs/node/pull/10026 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
444b907e92
commit
6aacef7300
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user