jest/coverage

Coverage Report

Generate test coverage report

jest
coverage
report

Command

npm test -- --coverage

Explanation

Generates a detailed coverage report showing which parts of your code are tested.

Examples

Generate coverage report

npm test -- --coverage

Generate HTML coverage report

npm test -- --coverage --coverageReporters=html

Set coverage threshold

npm test -- --coverage --coverageThreshold=80