Fork of Sunfit's jest-summary-reporter. Rewritten in TypeScript with a few additional options.
The default Jest reporter output is sometimes too fancy, especially in environments which doesn't support things such as colours etc. This can make the output difficult to read.
This custom reporter will print a more compact form of the information showing only the failed tests by default.
Additional options are available to customise the output. See options.
With single test
With multiple tests
npm i -D jest-compact-reporter
yarn add jest-compact-reporter -D
jest <...args> --reporters jest-compact-reporter
No options
// jest.config.js or jest.config.ts
{
"reporters": ["jest-compact-reporter"]
}
With options
// jest.config.js or jest.config.ts
{
"reporters": [
["jest-compact-reporter", { diffs: true, colours: true, showPassingTests: false }]
]
}
Defaults to true
. If enabled prints Jest's default error explanations for each failing test.
Defaults to true
. If enabled adds colours to the output for improved readability. Disable when an environment doesn't support colours.
Defaults to false
. If enabled shows test names of passing tests as well rather than just the suite.
- Node 12+
- Jest 20+
- NPM 6 or Yarn
- Run
npm install
oryarn install
- Run
npm build-and-test
to test changes to the reporter. Note the defaultjest.config.ts
has already been setup to use the development reporter.
Unlicense Licence
See LICENCE.md