-
-
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
chore: Align snapshots in jest-diff #8959
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8959 +/- ##
======================================
Coverage 64.2% 64.2%
======================================
Files 276 276
Lines 11718 11718
Branches 2868 2869 +1
======================================
Hits 7523 7523
Misses 3563 3563
Partials 632 632 Continue to review full report at Codecov.
|
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.
Question: Before I go on to 5 snapshot test files in
expect
package, do I need to consider an alternative to repetition of the same or very similar inline serializer?
Would probably make sense to extract this - packages/test-utils
is a bit of a mess but maybe we can start using that package for some more things?
import { ansiSnapshotSerializer } from '@jest/test-utils';
@jeysal Yeah,
and include the subdirectory as item of |
Excluding some specific files under |
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
Display colors concisely and clearly so you can review future changes quickly and confidently
Also omits distracting escape of double quote marks
addSnapshotSerializer
for only the expected colors with one-letter tag namesstripAnsi
only for edge case error messagesstripAnsi
with options andtoMatch
withtoBe
in assertions for comparison lines (which as a future chore could become snapshots with the serializer andomitAnnotationLines
option)Question: Before I go on to 5 snapshot test files in
expect
package, do I need to consider an alternative to repetition of the same or very similar inline serializer?Test plan
diff.test.ts.snap
updated 35