Skip to content

Commit

Permalink
add IGNORE_COVERAGE env for only show coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliytv authored Dec 17, 2021
1 parent 8d04f71 commit f1b2d63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ if (false) console.log('Never runs.');

Substitutes the normal `node` command; any [`node` CLI options](https://nodejs.org/api/cli.html#cli_options) can be used to run a test script. If the script doesn’t error a code coverage analysis is reported to the console, and if coverage is incomplete the exit code is `1`.

If environment IGNORE_COVERAGE is set, coverage-node show result to console, but return last run code from test process:
```sh
IGNORE_COVERAGE=true npx coverage-node test.mjs
echo $? # return 0, if test is successful
```

#### Examples

_Using [`npx`](https://docs.npmjs.com/cli/v7/commands/npx)._
Expand Down

0 comments on commit f1b2d63

Please sign in to comment.