cov-diff
v1.0.2
Published
Prints the difference between two instanbul coverage summaries
Downloads
3
Readme
cov-diff
Prints the difference between two instanbul coverage files. Used to show test coverage change.
Usage
pnpx cov-diff <old-file-path> <new-file-path>
The filepaths should be istanbul generated test coverage summary json files. This could be generated by the istanbul cli from a report, directly by test runner options (for jest --coverageReporters="json-summary"
), or other methods depending on how you're generating coverage.
Example:
Run:
pnpx cov-diff coverage-summary1.json coverage-summary2.json
Outputs something like:
| File | Lines | Functions | Statements | Branches |
| ------------------------------ | -------------- | ------------ | ------------ | ------------ |
| total | 89.02 (-0.55) | 90.25 (0.00) | 89.03 (0.00) | 79.47 (0.00) |
| /Users/me/project/src/index.ts | 63.16 (-15.78) | 71.42 (0.00) | 80.95 (0.00) | 72.22 (0.00) |