coverage-report-transform
v1.10.1
Published
Collect the list of packages from changeset folder
Downloads
706
Readme
What does this do?
Collect md test reports and transform in preferable way to show as a comment.
How to use it?
Execute:
npx coverage-report-transform
npx coverage-report-transform --help
npx coverage-report-transform . -n coverage-summary.json -f ./apps ./dashboardBaseline / regression comparison
Pass a directory containing a previous run's coverage reports (e.g. the ones
produced on main) to show, per package and per metric, how the current
coverage changed relative to that baseline. The baseline directory is searched
the same way as the current one (-n, -f, -l), so it should mirror the same
layout (e.g. apps/<app>/coverage/coverage-summary.json).
npx coverage-report-transform . -b ./.coverage-baselineEach metric cell gets an inline delta: ▲+2.1 (improvement), 🔻-4 (regression),
= (unchanged). Packages with no matching baseline file render without a delta.
Without -b the output is unchanged.
Optionally fail the run on a regression (for gating):
# exit non-zero if any metric drops at all
npx coverage-report-transform . -b ./.coverage-baseline --fail-on-regression
# exit non-zero only if a metric drops more than 1 percentage point
npx coverage-report-transform . -b ./.coverage-baseline --fail-on-regression 1