Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
confirm file not-covered is present in the final report
  • Loading branch information
bahmutov committed Apr 21, 2020
commit 0f76cfbf6923b1e12b3ea5992eb16738a70bac3a
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,11 +384,11 @@ workflows:
# we will check the final coverage report
# to make sure it only has files we are interested in
# because there are files covered at 0 in the report
# TODO confirm "not-covered.js" is at 0/0 but included in the report
command: |
../../node_modules/.bin/check-coverage main.js
../../node_modules/.bin/check-coverage second.js
# ../../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js
../../node_modules/.bin/check-coverage not-covered.js
../../node_modules/.bin/only-covered --from coverage/coverage-final.json main.js second.js not-covered.js
working_directory: examples/all-files

- cypress/run:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ For example, if you want to only include files in the `app` folder, but exclude
}
```

**Note:** if you have `all: true` NYC option set, this plugin will check the produced `.nyc_output/out.json` before generating the final report. If the `out.json` file does not have information for some files that should be there according to `include` list, then an empty placeholder will be included, see [PR 208](https://github.com/cypress-io/code-coverage/pull/208).

## Disable plugin

You can skip the client-side code coverage hooks by setting the environment variable `coverage` to `false`.
Expand Down
3 changes: 1 addition & 2 deletions examples/all-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"report": "../../node_modules/.bin/nyc report"
},
"nyc": {
"all": true,
"include": ["*.js"]
"all": true
},
"devDependencies": {
"@babel/core": "7.9.0"
Expand Down