Application used to check code coverage by tests on added lines (ex. check coverage just on new code in PR)
npm install code-coverage-git-diff


This package is a fork of original
Application used to check code coverage by tests on added lines (ex. check coverage just on new code in PR)
1. Install tool
```
npm i -D code-coverage-git-diff
2. Run test to generate coverage report
``
npm test
3. Run application to analyze it
``
gitDiffCodeCoverage --repoPath=$(pwd) --reportPath=artifacts/coverage/coverage-summary.json --fileTemplate=app/*/.js --source=newBranch --target=master --reportFormat=json -v -m 80
Path to folder with initiated git repository (required)
``
--repoPath, String
Source branch or commit hash (ex. myCoolFeature)
``
--source, String
Target branch or commit hash (ex. master)
``
--target, String, defaultValue: 'master'
Path to generated report (json summary coverage report)
``
--reportPath, String, defaultValue: 'coverage/coverage-summary.json'
Verbose mode (display stats by each file and line)
``
--verbose, -v
Silent mode (hide all output)
``
--silent, -s
Minimum overall coverage
``
--minimumOverallCoverage, -m, Number, defaultValue: 70
Files to analyze
``
--fileTemplate, -f, String, defaultValue: 'src/*/.js'
Report format
```
--reportFormat, String, defaultValue: 'lcov', possible values: 'json', 'lcov'