Create merged coverage reports
npm install create-merged-coverage-reportsCombine multiple coverage reports into a single merged one
``bash`
npm i -D create-merged-coverage-reports
First, configure your testing framework to output either json, or, if you are running tests on multiple machines, relative-paths-istanbul-json-report, coverage reports
Then, merge your coverage reports using either the CLI, or the API
`
$ npx create-merged-coverage-reports@latest --help
Usage: create-merged-coverage-reports [options]
Create merged coverage reports
Options:
-v, --version output the version number
-c, --coverageFileGlob
-o, --outputDirectory
-r, --reporters
reports
-h, --help display help for command
`
`ts
import { createMergedCoverageReports } from "create-merged-coverage-reports";
async function main() {
await createMergedCoverageReports();
}
main();
`
Run pnpm run build to build the library.
Run pnpm run test` to execute the unit tests.
MIT © Aliaksandr Haurusiou.