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: --assert-full-diff #52921

Closed
wants to merge 1 commit into from
Closed

Conversation

RedYetiDev
Copy link
Member

Fixes #51902

This PR adds a --assert-full-diff option to have AssertionErrors print the full diff, rather than a truncated version.

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels May 9, 2024
@RedYetiDev RedYetiDev added the cli Issues and PRs related to the Node.js command line interface. label May 9, 2024
@MoLow
Copy link
Member

MoLow commented May 9, 2024

i'd rather we add an options object to assert.deepStrictEqual and assert.strictEqual instead of a flag

@RedYetiDev
Copy link
Member Author

i'd rather we add an options object to assert.deepStrictEqual and assert.strictEqual instead of a flag

I'm worried that users may misunderstand the options object for an object to be asserted

@aduh95
Copy link
Contributor

aduh95 commented May 10, 2024

The commit message does not adhere to the guidelines, the tests are not passing: I'm converting this PR to draft. I think you can that reviewing PRs takes time, and as it is currently it doesn't seem like reviewing this PR would be a good use of my time.
Have in mind that adding a CLI flag is a higher bar than extending the API.

Sorry if my comment sounds dismissive, I know you spent time making this PR, and I would prefer show more respect of that time you spend, but honestly I don't feel that you sending this PR as is is very respectful of the reviewers' time either.

@aduh95 aduh95 marked this pull request as draft May 10, 2024 14:42
@RedYetiDev
Copy link
Member Author

The commit message does not adhere to the guidelines, the tests are not passing: I'm converting this PR to draft. I think you can that reviewing PRs takes time, and as it is currently it doesn't seem like reviewing this PR would be a good use of my time. Have in mind that adding a CLI flag is a higher bar than extending the API.

No problem! I'll fix the PR and verify everything before I resubmit

Sorry if my comment sounds dismissive, I know you spent time making this PR, and I would prefer show more respect of that time you spend, but honestly I don't feel that you sending this PR as is is very respectful of the reviewers' time either.

I'm sorry, I'll fix the PR, I didn't realize it was failing the tests (sorry!).

@RedYetiDev
Copy link
Member Author

RedYetiDev commented May 22, 2024

(forgot to un-draft this)

Note: The tests are passing

@RedYetiDev RedYetiDev marked this pull request as ready for review May 22, 2024 20:10
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should aim for rewriting assert to a class to add options instead of using flags to define the output behavior. That would allow to add even more options that would be useful.
I do understand that mostly all assertions should be handled identically, but using a flag for that behavior seems unintuitive for me.

@RedYetiDev
Copy link
Member Author

Can this land (once conflicts are resolved), or is it not even worth it?

@RedYetiDev RedYetiDev closed this Sep 23, 2024
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. c++ Issues and PRs that require attention from people who are familiar with C++. cli Issues and PRs related to the Node.js command line interface. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test_runner: full diff option
6 participants