Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
test: check for error on invalid signal#10026
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: check for error on invalid signal #10026
Uh oh!
There was an error while loading. Please reload this page.
Conversation
bnoordhuis left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. CI: https://ci.nodejs.org/job/node-test-pull-request/5072/ (currently queued)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put a space before this comment, e.g. // Test...? :D
Asserts that an error should be thrown when an invalid signal is passed to process.kill
a82c7e2 to 5fdea9dCompare| // Test that kill throws an error for invalid signal | ||
| assert.throws(function(){process.kill(1,'test');},Error); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok but passing a regexp as the second argument would be better.
assert.throws(()=>{process.kill(1,'test');},/^Error:Unknownsignal:test$/);
Fishrock123 left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with @jasnell's suggestion.
Trott commented Dec 8, 2016
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: nodejs#10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Trott commented Dec 9, 2016
Landed in 6aacef7. I agree with the nit about using a RegExp rather than a constructor for |
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Asserts that an error should be thrown when an invalid signal is passed to process.kill(). PR-URL: #10026 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
test
Description of change
Asserts that an error should be thrown when an invalid signal is passed to process.kill