-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: assert that invalidcmd throws error code #23942
test: assert that invalidcmd throws error code #23942
Conversation
@@ -35,10 +35,14 @@ const invalidArgValueError = | |||
const invalidArgTypeError = | |||
common.expectsError({ code: 'ERR_INVALID_ARG_TYPE', type: TypeError }, 12); |
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.
Can we simply change the second argument to 13 here and reuse invalidArgTypeError
instead of defining invalidArgTypeErrorCallsOnce
?
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.
👍 yes of course.
2349ac6
to
d69a3d5
Compare
I was able to trace the test-commit failure to this error which seems harmless enough, although this is the first time I've tracked something like this down. |
CI resume build: https://ci.nodejs.org/job/node-test-pull-request/18268/ |
The travis ci error I'm seeing is:
...Presumably for the commit message guidelines, but I think I covered that? The subsystem is |
...Oh...the subsystem looks to be |
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code.
d69a3d5
to
b55906e
Compare
Hm. Updated the subsystem from |
Travis is linting the wrong commit (9d7895c, which happens to be the very first commit in this repository). cc fyi @Trott |
@jeromecovington You could try rebasing onto the current master branch. |
Don't worry about the commit linting. It lints the first commit in the PR. If there's a problem with the commit message, our tooling for landing will alert the person landing the PR, so it's not a big deal. |
Landed in 878f587 |
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: nodejs#23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Thanks for the contribution! 🎉 (If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.) |
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: #23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: #23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: #23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: #23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Update invalidcmd test case in test-child-process-spawn-typeerror to assert on specific expected error code. PR-URL: #23942 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Update invalidcmd test case in test-child-process-spawn-typeerror to
assert on specific expected error code.
I've been interested in custom error codes in core for various reasons,
@Trott suggested this refactor as a place to start looking into usage in
tests.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes