Skip to content

Custom reporter for Jest that prints only the summary of the test results.

License

Notifications You must be signed in to change notification settings

CodeKingdomsTeam/jest-summary-reporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Custom reporter for Jest that prints only the summary of the test results.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%