"check-coverage" option ignored?
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 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 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_outputfolder? Is there.nyc_output/out.jsonfile. 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(nycobject) 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.
I found the same issue. Is it possible to configure somehow?
I need it too.
How to setup "coverage treshold" with Cypress ?