Skip to content
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.partialDeepStrictEqual not working when comparing [0] and [-0] #56230

Closed
puskin94 opened this issue Dec 11, 2024 · 0 comments
Closed

assert.partialDeepStrictEqual not working when comparing [0] and [-0] #56230

puskin94 opened this issue Dec 11, 2024 · 0 comments
Labels
assert Issues and PRs related to the assert subsystem. confirmed-bug Issues with confirmed bugs.

Comments

@puskin94
Copy link
Contributor

puskin94 commented Dec 11, 2024

Version

v22.12.0

Platform

Darwin something.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:23 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6031 arm64

Subsystem

No response

What steps will reproduce the bug?

const assert = require('assert');

assert.throws(() => assert.deepStrictEqual([0], [-0]), Error);
assert.throws(() => assert.partialDeepStrictEqual([0], [-0]), Error); // This will fail

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

assert.partialDeepStrictEqual should behave as assert.deepStrictEqual

What do you see instead?

The method call does not throw

Additional information

@jakecastelli jakecastelli added assert Issues and PRs related to the assert subsystem. confirmed-bug Issues with confirmed bugs. labels Dec 12, 2024
aduh95 pushed a commit that referenced this issue Jan 2, 2025
Fixes: #56230
PR-URL: #56237
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
aduh95 pushed a commit that referenced this issue Jan 31, 2025
Fixes: #56230
PR-URL: #56237
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem. confirmed-bug Issues with confirmed bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants