Skip to content

Commit

Permalink
doc: switch nyc to c8
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jan 21, 2019
1 parent 994151a commit 6bbcf31
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ run `c8 report` to regenerate reports after `c8` has already been run.

## Checking coverage

nyc can fail tests if coverage falls below a threshold.
After running your tests with nyc, simply run:
c8 can fail tests if coverage falls below a threshold.
After running your tests with c8, simply run:

```shell
nyc check-coverage --lines 95 --functions 95 --branches 95
c8 check-coverage --lines 95 --functions 95 --branches 95
```

nyc also accepts a `--check-coverage` shorthand, which can be used to
c8 also accepts a `--check-coverage` shorthand, which can be used to
both run tests and check that coverage falls within the threshold provided:

```shell
nyc --check-coverage --lines 100 npm test
c8 --check-coverage --lines 100 npm test
```

The above check fails if coverage falls below 100%.

To check thresholds on a per-file basis run:

```shell
nyc check-coverage --lines 95 --per-file
c8 check-coverage --lines 95 --per-file
```

## Supported Node.js Versions
Expand Down

0 comments on commit 6bbcf31

Please sign in to comment.