Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.22 KB

README.md

File metadata and controls

67 lines (43 loc) · 2.22 KB

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.

jestsummaryreporternodiffssmall

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:

jestsummaryreporternodiffs

With diffs option:

jestsummaryreporter

When all tests pass:

jestsummaryreportersuccess

License

Unlicense