-
Notifications
You must be signed in to change notification settings - Fork 30k
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: add block scoping to test-assert-deep #16532
Conversation
@Trott - can you please provide a rational ( a one liner may be) for doing this? Is it readability or something else? (such as performance / footprint etc.? are we expecting |
@gireeshpunathil I think it's mostly for readability, also there will be fewer conflicts of variable names. |
@gireeshpunathil It's primarily to avoid unintentional side effects between test cases. (More can be done.) I'll add that to the commit message. |
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case.
4a711cc
to
a6e1740
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.
I find this much easier to read (tests are clearly separated).
thanks @Trott and @joyeecheung for clarifying |
CI failures are unrelated, can go ahead an land this now if we don't want to wait for 72 hours. |
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: #16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Landed in 203b548. |
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: #16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: #16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: #16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: nodejs/node#16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: nodejs/node#16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Add block scoping to test-assert-deep.js to reduce likelihood of one test case having side effects that affect another test case. PR-URL: nodejs/node#16532 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test assert