Skip to content

Commit

Permalink
Correct examples in README.md
Browse files Browse the repository at this point in the history
In the sample code, `check-coverage` was being shown as a flag (with dashes) rather than a straight up command.
  • Loading branch information
greggraf authored Oct 29, 2017
1 parent 6286bf8 commit a9b36b6
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit a9b36b6

Please sign in to comment.