1.2.3 • Published 4 years ago

@atakama/cover-diff v1.2.3

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

Build Status codecov

cover-diff

Report & enforce diff coverage on diffs only.

Install:

npm install @atakama/cover-diff

Use:

Pipe in diffs, get an lcov file out.

git diff origin/master | cover-diff > diff-cover.lcov
genhtml diff-cover.lcov -o diff-cover

Note:

If you don't have genhtml, do this:

curl -O https://raw.githubusercontent.com/linux-test-project/lcov/master/bin/genhtml
chmod +x genhtml
./genhtml diff-cover.lcov -o diff-cover

That works in most bashifed environments (including Windows under git bash).

Options:

Options are located in the package.json for your project. The default lcov path is the same as the istanbul default output path.

"@atakama/cover-diff" : {
    "lines" : 80,
    "branches" : 70,
    "functions" : 100,
    "lcovFile" : "coverage/lcov.info",
    "diffFile" : \<stdin\>,
    "stripRoot" : [<project-home-dir>],
}

Notes:

  • Empty or invali diff : exit with an error, no stdout.
  • Valid diff, but no lines in the diff match: no error exit, no stdout

Changelog

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago