-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix(node/assert): throw on deepStrictEqual({}, Object.create(null)) #29428
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
fix(node/assert): throw on deepStrictEqual({}, Object.create(null)) #29428
Conversation
There are some tests failing because they expect the old behavior where deno/tests/node_compat/test/parallel/test-sqlite-transactions.js Lines 32 to 43 in ff078dc
All the above assertions now fails because I think that setting deno/tests/node_compat/test/parallel/test-sqlite-transactions.js Lines 44 to 47 in ff078dc
There are lots of assertions in the code base that rely on that old behavior, this patch will touch lots of files in the source tree. Is that proposed change acceptable? |
@edilson258 Thanks for the PR. The maintainers will work on the fixes for the existing test cases (they should be passing as is). Please wait for a moment. |
Note to self (and the team):
|
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
Note: The fix is indirectly tested by the above compat cases
Thanks! |
assert.deepStrictEqual
now differentiates{}
fromObject.create(null)
This PR updates the object comparison logic to throw when comparing a plain object
({})
with an object created viaObject.create(null)
, matching Node.js behavior.Closes #27565