1.0.2 • Published 8 months ago

cov-diff v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

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) |
1.0.2

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago