Skip to content

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

Closed
@puskin

Description

@puskin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    assertIssues and PRs related to the assert subsystem.confirmed-bugIssues with confirmed bugs.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions