Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: pass test function to expectsError
PR-URL: #16944
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
  • Loading branch information
sam-github committed Nov 15, 2017
commit b0d675df28efda2898c6621851904c0565988363
8 changes: 2 additions & 6 deletions test/parallel/test-process-kill-pid.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,13 @@ assert.throws(function() { process.kill(1 / 0); },
assert.throws(function() { process.kill(-1 / 0); },
invalidPidArgument);

// Test that kill throws an error for invalid signal
const unknownSignal = common.expectsError({
// Test that kill throws an error for unknown signal names
common.expectsError(() => process.kill(1, 'test'), {
code: 'ERR_UNKNOWN_SIGNAL',
type: TypeError,
message: 'Unknown signal: test'
});


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

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