-
-
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
Inverting colors in snapshot tests #6379
Comments
The output is technically correct when you consider the intention of the test. When a snapshot has been written, it's considered the source of truth. Thus any diff to the snapshot introduced by a new test run would show in red, since it as a deviation from the source of truth. |
If anything, the green color could probably be changed to something else to remove this false allusion to standard diffs. Perhaps just white. |
Duplicate of #5430 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
💬 Questions and Help
I'm using create-react-app with jest for snapshot tests. Here's a sample output:
My team is finding this a bit difficult to grok, since the usual diff format they're used to (unix diff and git), uses red for an existing value, and green for the new value. Jest uses the opposite. I understand why it's done this way from the docs, but it's quite jarring in practice.
Is there a way to invert these colors?
Please note that this issue tracker is not a help form and this issue will be closed.
For questions or help please see:
The text was updated successfully, but these errors were encountered: