Jest summarizing reporter
Custom reporter for Jest that only prints the summary of the test run. With diffs
option, also prints the default error messages aka diffs before the summary example.
Personally I think this behaviour should not require a custom reporter,
and the level of similarity between this and the default output should be proof enough.
Tested only on my windows machine with a simple pet project.
If you have any questions or suggestions contact me by e-mail.
It came to my attention (a little too late) that at least 3 packages with same functionality already exist npm search results for jest summary reporters
So if you have found this repo but it is not working out for you for some reason, check out above link.
Installation
npm i -D jest-summarizing-reporter
Usage
CLI:
jest --reporters jest-summarizing-reporter
Jest Config:
{
"reporters": ["jest-summarizing-reporter"]
}
Options
diffs
If enabled prints jests default error explanations before the summary
{
"reporters": [
["jest-summarizing-reporter", {diffs: true}]
]
}
Output examples
Default output:
With diffs
option:
When all tests pass:
License
Unlicense