-
-
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
fix: Control no diff message color with diff options #9997
fix: Control no diff message color with diff options #9997
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.
Thanks! Could you update the changelog as well?
7c472fd
to
93ea8a1
Compare
@SimenB Thanks! Updated changelog 👍 |
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.
👍
…esolve-outside * upstream/master: (106 commits) docs: fix jest-diff example (jestjs#10067) Cleanup `displayName` type (jestjs#10049) docs: correct confusing filename in `enableAutomock` example (jestjs#10055) chore: minor optimize getTransformer (jestjs#10050) chore: fix TestUtils.ts to match the types (jestjs#10034) Minor test name typo fix (jestjs#10033) chore: upgrade to typescript 3.9 (jestjs#10031) feat: CLI argument to filter tests by projects (jestjs#8612) chore: bump `istanbul-lib-instrument` (jestjs#10009) feat: support config files exporting (`async`) `function`s (jestjs#10001) fix: add missing haste-map dep to jest-snapshot (jestjs#10008) 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 (jestjs#10000) Fix typo in dependency warning (jestjs#10006) chore: add missing comma (jestjs#9999) fix: Control no diff message color with diff options (jestjs#9997) fix(jest-jasmine2): fix Error message (jestjs#9990) docs: fix jest-object ids for docusaurs (jestjs#9994) docs: fix Configuration, JestPlatform and JestObjectAPI docs for 26 (jestjs#9985) Add migration notes for breaking changes (jestjs#9978) chore: fix date and heading in blog post (jestjs#9977) ...
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
snapshot-diff
has been updated to make use ofjest-diff
options for no colors, as provided in the documentation. Unfortunately, the "no visual differences" message is still output withchalk.dim
and doesn't make use of the options for no colors - this means that some snapshot diffs are now outputting ansi escape codes.This PR updates the
NO_DIFF_MESSAGE
andSIMILAR_MESSAGE
messages to use thecommonColor
value from the diff options, which defaults tochalk.dim
, but can now be overridden by the user.Test plan
commonColor
is set tonoColor
(identity), no ansi escape codes are outputcommonColor
is set tochalk.yellow
, theNO_DIFF_MESSAGE
is correctly set as yellow