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

Expose createErrDiff for diffing objects #51740

Open
JMTK opened this issue Feb 13, 2024 · 3 comments · May be fixed by #57462
Open

Expose createErrDiff for diffing objects #51740

JMTK opened this issue Feb 13, 2024 · 3 comments · May be fixed by #57462
Labels
feature request Issues that request new features to be added to Node.js.

Comments

@JMTK
Copy link

JMTK commented Feb 13, 2024

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

@JMTK JMTK added the feature request Issues that request new features to be added to Node.js. label Feb 13, 2024
@BridgeAR
Copy link
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 .

@avivkeller
Copy link
Member

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

Copy link
Contributor

There has been no activity on this feature request for 5 months. To help maintain relevant open issues, please add the never-stale Mark issue so that it is never considered stale 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.

@github-actions github-actions bot added the stale label Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
puskin94 added a commit to puskin94/node that referenced this issue Mar 14, 2025
@pmarchini pmarchini removed the stale label Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js.
Projects
Status: Awaiting Triage
Development

Successfully merging a pull request may close this issue.

4 participants