Is there a good report for jest test case?

There is also a JEST HTML Reporter module which you might find useful. It's configurable to specify what level of detail you want to show in the test report for failures

https://www.npmjs.com/package/jest-html-reporter


https://github.com/jest-community/awesome-jest#reporters contains a list of other reporters. jest-stare will let you filter off passing tests so you can just see the ones that failed.


You can run jest with the --coverage flag.

If you want something different than the default reporters, you have to set them in your jest config file.

jest.json

{
  "coverageReporters": ["text-summary", "html"]
}

text-summary gives you a short summary beneath all tests that tells you how many suites/tests are successful/failed.

html gives you a some html pages that you can browse through to see exactly what got tested.

CLI

$ ./node_modules/.bin/jest --config ./path/to/jest.json --coverage

You might want to adjust which files are covered etc. See all coverage options in the jest docs.

Tags:

Jestjs