Skip to content

unexpected diff on assert.deepStrictEqual #51733

Closed
@oriongonza

Description

@oriongonza

Version

v20.5.0 (tried on node 16 and 21)

Platform

([ronment]::OSVersion.VersionString) x64

What steps will reproduce the bug?

require("assert").deepStrictEqual(
  {
    common: {},
    key1: "",
    creator: "123",
  },
  {
    creator: "123",
  },
);

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

Always

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

Only comon and key1 exist so

  {
+   common: {},
+   key1: ''
  }

What do you see instead?

  {
+   common: {},
+   creator: '123',
+   key1: ''
-   creator: '123'
  }

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    assertIssues and PRs related to the assert subsystem.feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions