js-diff-analyzer

0.0.3 • Public • Published

js-diff-analyzer

Uses Istanbul code coverage reports to check if all of your changed code is covered by unit tests

Install

$ npm install -g js-diff-analyzer

or

$ yarn global add js-diff-analyzer

Usage

Run your tests in your project. Create coverage output via Istanbul in the json format. I.e. for Jest:

$ jest --coverageReporters ['json'] --collectCoverage true --coverageDirectory './coverage'

Then analyze the coverage report using js-diff-analyzer:

$ js-diff-analyzer -r './' -c './coverage'

This will output uncovered lines like this:

Changes on your branch are not covered:
app/src/renderer/components/common/AppHeader.vue (Lines: 35, 36 )
app/src/renderer/components/staking/PageBond.vue (Lines: 268, 269, 270, 271 )
app/src/renderer/components/staking/PageStaking.vue (Lines: 175, 176 )

Readme

Keywords

none

Package Sidebar

Install

npm i js-diff-analyzer

Weekly Downloads

0

Version

0.0.3

License

MIT

Unpacked Size

9.2 kB

Total Files

8

Last publish

Collaborators

  • faboweb