-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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: increase readfile abort coverage #36429
Conversation
Hey thanks for this. Please run |
{ | ||
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown | ||
assert.throws(() => { | ||
const callback = () => {}; |
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.
const callback = () => {}; | |
const callback = common.mustNotCall(); |
@@ -59,3 +59,14 @@ const execOpts = { encoding: 'utf8', shell: true }; | |||
execFile(process.execPath, [echoFixture, 0], { signal }, callback); | |||
ac.abort(); | |||
} | |||
|
|||
{ | |||
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown |
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.
Please keep the capitalization: I'd do something like:
// Verify that the if something different than Abortcontroller.signal is passed - ERR_INVALID_ARG_TYPE is thrown | |
// Verify that passing a non-signal to execFile throws an ERR_INVALID_ARG_TYPE |
b415c55
to
2d1c82b
Compare
b4b387e
to
29898e6
Compare
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.
Thanks! 🙏
The commit message says |
Verify that if something different than Abortcontroller.signal is passed to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown. PR-URL: nodejs#36429 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
d78ca5b
to
5dd58d0
Compare
Landed in 5dd58d0. Thanks for the contribution! 🎉 |
Verify that if something different than Abortcontroller.signal is passed to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown. PR-URL: #36429 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Verify that if something different than Abortcontroller.signal is passed to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown. PR-URL: nodejs#36429 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Verify that if something different than Abortcontroller.signal is passed to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown. PR-URL: nodejs#36429 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Verify that if something different than Abortcontroller.signal is passed to child_process.execFile(), ERR_INVALID_ARG_TYPE is thrown. PR-URL: nodejs#36429 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
No description provided.