fix(matcher-utils): correct diff for expect asymmetric matchers by davidnormo · Pull Request #12264 · jestjs/jest (original) (raw)
Conversation
Summary
Fixes #10276 - I've applied @SamLee's suggestion
Problem:
// Where objectContaining is the wrapping the expectation the diff would not work as expected expect(obj).toEqual(expect.objectContaining(obj2));
Test plan
Before
After
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems odd to me to remove the check for expectedType, but not receivedType? Although I guess passing an asymmetric matcher as received is weird, so maybe not
There appears to be a couple of failing tests on main not coming from this change
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is not happy , i think this is due to this change
CI is not happy , i think this is due to this change
The same failures are on main, unrelated to my change afaik
All tests are failing, that's not happening on main 😀
I've rebased from main and I get these failing tests on my branch and main locally:
- e2e/tests/watchModePatterns.test.ts
- e2e/tests/customInlineSnapshotMatchers.test.ts
All others passing...
I've rebased from main and I get these failing tests on my branch and main locally:
- e2e/tests/watchModePatterns.test.ts
- e2e/tests/customInlineSnapshotMatchers.test.ts
All others passing...
Thanks for resolving.
All tests are failing, that's not happening on
main😀
🤦♂️ I wasn't building locally
All tests are failing, that's not happening on
main😀🤦♂️ I wasn't building locally
Haha, that happens 👍
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
thanks!
Ah it looks like my CHANGELOG change got clobbered. Shall I open a separate PR for it?
chentsulin added a commit to chentsulin/jest that referenced this pull request
SimenB pushed a commit that referenced this pull request
This was referenced
Feb 7, 2022
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
github-actions Bot locked as resolved and limited conversation to collaborators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})

