-
-
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-diff: Rename some new options and change their default values #9077
Conversation
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 agree this is easier to grok 👍
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
Split and rename
trailingSpaceFormatter
option as prerequisite to improve snapshot colors:changeLineTrailingSpaceColor
becauseaColor
andbColor
might have background colorcommonLineTrailingSpaceColor
becausedim
does not modify like other colorsRename
firstOrLastEmptyLineReplacement
asemptyFirstOrLastLinePlaceholder
Change default values so dependents can turn them on instead of need to turn them off (not breaking, because the new options have not yet been published)
Edit
README.md
table and examples of new optionsProvide explicit values for these options in
jest-matcher-utils
andjest-snapshot
Export
DiffOptionsColor
type sojest-snapshot
can declaregetSnapshotColor
andgetReceivedColor
with conditional expression ofchalk.level
to return improved colorsTest plan
In
jest-diff
package:diff.test.ts
add 1 test and update 2 tests fortrailingSpaceFormatter
joinAlignedDiffs.test.ts
addemptyFirstOrLastLinePlaceholder
which affects 3 tests