-
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
assert: handle (deep) equal(NaN, NaN) as being identical #30766
Conversation
This aligns the `equal` and `deepEqual()` implementations with the strict versions by accepting `NaN` as being identical in case both sides are NaN. Refs: nodejs#30350 (comment)
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This probably requires an update to assert.md since this diverges from the Abstract Equality Comparison cited in the doc? |
I mean, I see the YAML is updated, but I think the actual text for |
@Trott I updated the documentation accordingly. |
This comment has been minimized.
This comment has been minimized.
CI: https://ci.nodejs.org/job/node-test-pull-request/27419/ ✅ (yellow build with two Windows flakes) |
This aligns the `equal` and `deepEqual()` implementations with the strict versions by accepting `NaN` as being identical in case both sides are NaN. Refs: #30350 (comment) PR-URL: #30766 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Landed in 5360dd1 🎉 |
This aligns the
equal
anddeepEqual()
implementation with thestrict version by accepting
NaN
as being identical incase both sides are NaN.
Refs: #30350 (comment)
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes