-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
jest-snapshot: Improve report when matcher fails, part 14 #8132
Conversation
Example pictures baseline followed by improved
Updated according to #8132 (comment)
Updated according to #8132 (comment)
Updated according to #8132 (comment)
Updated according to #8132 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like the direction it's going. Left a few inline comments to consider
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. |
Summary
4 snapshot matchers
Correct: matcher name in regular black
Complete:
.rejects
,.resolves
, or.not
name
hint
,properties
, orsnapshot
Clear:
keyname value as template literal same as in.snap
filename in greenhint in bold font weightConsistent:
'Received function did not throw'
fromtoThrow
matcherResidue:
Test plan
Updated
e2e
tests:failures.test.ts.snap
watchModeUpdateSnapshot.test.ts.snap
toMatchInlineSnapshot.test.ts
toMatchSnapshot.test.ts
toThrowErrorMatchingInlineSnapshot.test.ts
toThrowErrorMatchingSnapshot.test.ts
snapshot.test.js
See also pictures in following comment.