-
-
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
[Feature]: Add options to ignore snapshot diffs and suppress their output #12240
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
I would appreciate a response from the team on this. I don't think it's fair to close un-answered feature requests as "stale" in such a short amount of time. Even a "no, wontfix" is fine. |
I don't think we want to make this configurable. What you can do is write a custom reporter ( And yeah, the bot is kinda aggressive, sorry about that! See #12496 for background |
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. |
🚀 Feature Proposal
I want to be able to run the test suite and either (or both):
console.log
output. Maybe the snapshot diffs can be optionally written to a log file instead of stdout.Motivation
Sometimes, I know that my snapshots have changed, and sometimes the diffs can be huge.
These huge diffs make it very very difficult to scroll back and see other details about individual test failures.
It appears that this is not currently possible, because I don't see anything about it in any docs that I could find, and my Stackoverflow question has gone unanswered.
Example
I work on an application that uses Apollo GraphQL. Apollo recognizes the
DEBUG
environment variable, so that it returns debugging output in GraphQL responses. If I run Node/Jest withDEBUG=1
, this causes a lot of my snapshots to change, but I don't care about 99% of those changes. I only care about a few error messages that I am logging through the application.Other times, I simply want to produce a list of test suites/assertions that have failed, without such detailed output. There does not appear to be any functionality to do this.
Pitch
I don't believe it is possible to extend Jest in this fashion. I tried using something called
jest-silent-reporter
, but it did not change the snapshot diff output.Note that I am not really a NodeJS user, so I apologize if this is possible somehow, but I am too ignorant to ask the right questions, use the right search terms, etc.
The text was updated successfully, but these errors were encountered: