Skip to content

Expose createErrDiff for diffing objects #51740

Description

@JMTK

What is the problem this feature will solve?

I like the general format of the deepStrictEqual diff comparisons, but it would be nice to get this functionality "natively" to print a diff instead of forcing it to error to see a diff.

What is the feature you are proposing to solve the problem?

Expose createErrDiff from assert

function createErrDiff(actual, expected, operator) {

What alternatives have you considered?

Userland diff tool, but if the code is already there it would be nice to expose it

Activity

  1. BridgeAR commented on Mar 22, 2024

    @BridgeAR
    Member

    The current implementation is not ideal. I would not expose that for now. It is just a best effort implementation and not e.g., Myers .

  2. avivkeller commented on Sep 14, 2024

    @avivkeller
    Member

    Just a little update here: #54862 will switch the alg to Myers

  3. github-actions commented on Mar 14, 2025

    @github-actions
    Contributor

    There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-stale Issues and PRs exempt from automated stale handling. label or close this issue if it should be closed. If not, the issue will be automatically closed 6 months after the last non-automated comment.
    For more information on how the project manages feature requests, please consult the feature request management document.

  4. added
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Mar 14, 2025
  5. removed
    staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.
    on Mar 15, 2025
  6. 6 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions