You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to run the test suite and either (or both):
Ignore changes in snapshots, so that they are not reported as failures
Do not print the snapshot diffs while the test is running, so that it's easier to scroll up and see which tests failed, along with any associated 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 with DEBUG=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:
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 (jest-silent-reporter might be open to taking a PR with an option for what you want, or you can look at it as inspiration for your own).
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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
馃殌 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: