Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 210290d

Browse filesBrowse files
mattcphillipsMylesBorins
authored andcommitted
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>
1 parent 4f5f0e4 commit 210290d
Copy full SHA for 210290d

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-process-kill-pid.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-kill-pid.js
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ assert.throws(function() { process.kill(+'not a number'); }, TypeError);
2424
assert.throws(function() { process.kill(1 / 0); }, TypeError);
2525
assert.throws(function() { process.kill(-1 / 0); }, TypeError);
2626

27+
// Test that kill throws an error for invalid signal
28+
29+
assert.throws(function() { process.kill(1, 'test'); }, Error);
30+
2731
// Test kill argument processing in valid cases.
2832
//
2933
// Monkey patch _kill so that we don't actually send any signals, particularly

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.