@heddendorp/coverage-git-compare
v1.9.9
Published
CLI tool to compare coverage reports with git changes
Downloads
71
Readme
Coverage Git compare CLI
This is a small CLI tool to make use of the files generated by the cypress-plugin-mulitlanguage-coverage plugin.
It will compare the collected coverage with the git changes specified and show if changed files are covered by tests.
Installation
npm install -D @heddendorp/coverage-git-compare
You can find the releases of the package on GitHub.
Usage
Make sure you have collected coverage data with the cypress-plugin-mulitlanguage-coverage plugin before getting started.
You can run the plugin with the following command:
npx coverage-git-compare compare
You can also specify a commit from which changes should be compared to the current state:
npx coverage-git-compare compare -c <commit>
Ideally this is the commit where tests last passed
Limitations
There is currently no support for finind the last passing commit for a test automatically by checking build logs. Future versions of this package or additional packages could help with this issue.
References
- TypeScript project setup by DigitalOcean
- Building a CLI tool by Jeroen Ouwehand
- gitlog library
- Node.js with TypeScript in 2023 by Beyond Fireship