-
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,repl: use deepStrictEqual for false-y values #6196
Conversation
LGTM. And yes, IMO we should make all of the assertions as strict as practical to avoid surprises. |
We could make a lint rule that requires strict assertions for the tests, but I feel people may be opposed to that? |
Oh, yeah, sorry, I just copied from the already-present test. But this sounds good to me, too. |
LGTM. @Fishrock123 I have a lint rule written and will submit a PR soon. We'll find out if there's opposition or not... |
LGTM |
1 similar comment
LGTM |
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Landed in 15d970d |
@jasnell Please avoid landing other collaborator's stuff. I don't think this PR/commit is worthwhile in light of the discussion, thanks. |
@Fishrock123 ... just following the same process I do for everything (and the same process I will continue to follow). There were multiple LGTM's, no obvious indication that it shouldn't land, and green CI. If this is something that you feel should be reverted, please feel free to open a PR reverting it. Suggestion: we do have an |
Historically, for a long time, we have mostly avoided merging other collaborators PRs unless they are npm upgrades, or critical fixes of some sort. I see that is not stated in our resources and am going to make amends to those.
In this case, it's just unnecessary git history. (And personally, as the author of this commit, slightly non-sensical in hindsight.) |
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
PR-URL: nodejs#6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
PR-URL: #6196 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Checklist
Affected core subsystem(s)
doc,repl
Description of change
Refs: 0b66b8f#commitcomment-17104918, #6192
... Should we just change this throughout all of our testes, except the assert ones themselves?
As a note, I'm not sure how much it matters for this test, but testing false-y values with
deepEqual()
can easily miss problems.cc @nodejs/testing