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 does not properly work comparing Int16Arrays, ArrayBuffers and SharedArrayBuffers #56097

Closed
puskin94 opened this issue Dec 1, 2024 · 0 comments · Fixed by #56098
Labels
assert Issues and PRs related to the assert subsystem.

Comments

@puskin94
Copy link
Contributor

puskin94 commented Dec 1, 2024

Version

v24.0.0-pre

Platform

Darwin prot-2.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?

Following what still needed to be done in #54630 , I kept looking for discrepancies between what works with assert.deepStrictEqual and what should work with assert.partialDeepStrictEqual but it does not.

const assert = require('assert');

assert.throws(() => assert.partialDeepStrictEqual(new ArrayBuffer(3), new SharedArrayBuffer(3)), Error);
assert.throws(() => assert.partialDeepStrictEqual(new Int16Array(3), new Uint16Array(3)), Error);
assert.partialDeepStrictEqual(new Int16Array([1, 2, 3]), new Int16Array([1, 2, 3]));

all the tests above will fail, while they should not

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

always

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

const assert = require('assert');

assert.throws(() => assert.partialDeepStrictEqual(new ArrayBuffer(3), new SharedArrayBuffer(3)), Error);
assert.throws(() => assert.partialDeepStrictEqual(new Int16Array(3), new Uint16Array(3)), Error);
assert.partialDeepStrictEqual(new Int16Array([1, 2, 3]), new Int16Array([1, 2, 3]));

all the tests above will fail, while they should not

What do you see instead?

the tests above will fail

Additional information

No response

puskin94 added a commit to puskin94/node that referenced this issue Dec 1, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 1, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 1, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 1, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 1, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 2, 2024
@VoltrexKeyva VoltrexKeyva added the assert Issues and PRs related to the assert subsystem. label Dec 2, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 3, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 3, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 4, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 4, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 5, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 5, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 7, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 7, 2024
puskin94 added a commit to puskin94/node that referenced this issue Dec 7, 2024
aduh95 pushed a commit that referenced this issue Dec 10, 2024
Fixes: #56097
PR-URL: #56098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
ruyadorno pushed a commit that referenced this issue Dec 20, 2024
Fixes: #56097
PR-URL: #56098
Reviewed-By: Antoine du Hamel <duhamelantoine1995@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.
Projects
None yet
2 participants