-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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: update test-require-json.js #28358
Conversation
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.
Welcome @alejandronanez and thanks for the pull request. I imagine the idea here was to replace the try/catch
. This change as it stands merely complicates the test. If you're at Code & Learn and you're not sure how to proceed, ask a mentor for some help! Thanks!
Hey @Trott thanks for chiming in! Actually this change was made based on the feedback from @ErickWendel at the
How should I proceed from here then? Thanks again :)! |
Replace the entire |
haha @alejandronanez sorry, I told you to put the |
As this change currently stands, it does not merely complicate the test. It also invalidates it! The test will always pass. The error is no longer checked, other than to confirm that |
Hello @Trott, I made some updates to the test. Let me know what you think, thanks! |
We're getting close! |
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 the comment addressed.
438cebe
to
edac779
Compare
wow I completely missed this conversation! I already fixed the lint errors in edac77982b56b5a358361048ad6166e7f2f1c725. Thanks y'all for your feedback |
Use assert.throws() instead of try/catch.
edac779
to
0ab7845
Compare
Use assert.throws() instead of try/catch. PR-URL: nodejs#28358 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in c3b2111. 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/.) |
Use assert.throws() instead of try/catch. PR-URL: #28358 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Used assert.throws instead of assert.ok in
test/parallel/test-require-json.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes