Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,22 +154,22 @@ nyc can fail tests if coverage falls below a threshold.
After running your tests with nyc, simply run:

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

nyc 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
nyc 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
nyc check-coverage --lines 95 --per-file
```

## Running reports
Expand Down