jest-summarizing-reporter

1.1.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i jest-summarizing-reporter

Weekly Downloads

7,325

Version

1.1.4

License

Unlicense

Unpacked Size

12.8 kB

Total Files

21

Last publish

Collaborators

  • sunfit