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

Fix the order of arguments in the Jest matcher util #1245

Merged
merged 1 commit into from May 6, 2022

Conversation

silvenon
Copy link
Sponsor Contributor

@silvenon silvenon commented May 5, 2022

Some custom matchers like those in @testing-library/jest-dom use this.utils.diff for the output. In Jest the order of arguments in that util is "expected", then "received", so here I'm fixing the order of those arguments to match Jest's implementation.

Fixes #1239.

Some custom matchers like `@testing-library/jest-dom` use
`this.utils.diff` for the output. In Jest the order of arguments in that
util is "expected", then "received", so we're fixing the order of those
arguments here to match Jest's implementation.
@netlify
Copy link

netlify bot commented May 5, 2022

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit a8b090d
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/62743f38261ae30009f304d6
😎 Deploy Preview https://deploy-preview-1245--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sheremet-va sheremet-va merged commit 70bc30b into vitest-dev:main May 6, 2022
@silvenon silvenon deleted the fix-jest-diff-util branch May 6, 2022 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The "expected" and "actual" arguments in unifiedDiff are reversed compared to Jest
2 participants