cypress-io / cypress-io/code-coverage
"check-coverage" option ignored?
- Dominant language
- TypeScript
- Stars
- 445
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
My `.nycrc.json` file has the `check-coverage: true` option (also tried `checkCoverage`), but it seems to be ignored. After debugging the code in `task.js` it seems like there's just a call to `nyc.report` and not to `nyc.checkCoverage`. What am I missing?
I've put logs inside the task to make sure the correct `.nycrc` file is read and this seems to be the case.
**Versions**
- What is this plugin's version? If this is NOT the latest [released version](https://github.com/cypress-io/code-coverage/releases) can you try the latest version, please?
- If the plugin worked before in version X, but stopped after upgrading to version Y, please try the [released versions](https://github.com/cypress-io/code-coverage/releases) between X and Y to see where the breaking change was.
- What is Cypress version?: `3.9.12`
- What is your operating system?: `OSX 12.1`
- What is the shell?: `ZSH`
- What is the Node version?: `16.10.0`
- What is the NPM version?: `8.5.2`
- How do you instrument your application?: `Running it through an nx runner which basically calls this: https://github.com/nrwl/nx/blob/master/packages/cypress/src/executors/cypress/cypress.impl.ts#L216 with the Cypress options.
- When running tests, if you open the web application in regular browser, and open DevTools, do you see `window.__coverage__` object? Can you paste a screenshot?
- Is there `.nyc_output` folder? Is there `.nyc_output/out.json` file. Is it empty? Can you paste at least part of it so we can see the keys and file paths?: `It's not empty, and the coverage is reported well - just not checked`.
- Do you have any custom NYC settings in `package.json` (`nyc` object) or in other [NYC config files]:
This is my config file, in a `.nycrc.json`:
```
"all": true,
"include": ["../src/client/**"],
"extension": [".js", ".cjs", ".ts", ".tsx", ".jsx"],
"reporter": ["lcov", "clover", "json", "text-summary"],
"check-coverage": true,
"checkCoverage": true,
"branches": 100,
"lines": 100,
"functions": 100,
"statements": 100,
```
- Do you run Cypress tests in a Docker container?: `No`
**Link to the repo**
Private repo.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.