cypress-io / cypress-io/code-coverage
[cy10] non "cra" react app: "glob pattern string required (current version of @cypress/code-coverage is not supported)"
- Dominant language
- TypeScript
- Stars
- 445
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
Dear Cypress Devs,
first congratulations to the release of version 10. Looks good :rocket:
However, unfortunately the code-coverage plugin is no longer working for us.
See error message below
**Logs and screenshots**
"Cypress detected that the current version of @cypress/code-coverage is not supported. Update it to the latest version"
**Versions**
plugin: > 3.10.0 (tried `npm i https://github.com/cypress-io/code-coverage` as well)
cypress: > 9.7.0
Operating System: Pop!_OS 20.10 x86_64
Shell: zsh 5.8
Node: v16.13.2
NPM: 8.5.5
react": "^16.14.0"
Instrument the code using:
"babel-plugin-istanbul": "^6.0.0",
`Object.keys(window.__coverage__).length` => 51
Is there `.nyc_output` folder? => NO
custom nyc settings:
```json
"nyc": {
"report-dir": "cypress/coverage",
"reporter": [
"cobertura",
"json-summary",
"json",
"lcov"
]
},
```
Do you run Cypress tests in a Docker container? => NO
**Describe the bug**
I try to run a any test using the newest code-coverage plugin (3.10.0) with the newest cypress version (10.1.0)
but it errors out on the test runner and from the command line with the same error:
"Cypress detected that the current version of @cypress/code-coverage is not supported. Update it to the latest version"
Done test:
```javascript
describe("Test", () => {
it("test login", () => {
cy.visit(Cypress.config("baseUrl"));
cy.screenshot()
});
});
```
Below you find my configs:
```javascript
e2e: {
setupNodeEvents(on, config) {
return require('./plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:4000',
experimentalSessionAndOrigin: true,
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
},
```
```javascript
///
const webpack = require("@cypress/webpack-preprocessor");
/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
// does not matter if used webpack or not in both cases the same error
// const options = {
// webpackOptions: require("../../webpack.testing.js"),
// watchOptions: {},
// };
// on("file:preprocessor", webpack(options));
require("@cypress/code-coverage/task")(on, config);
return config;
};
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.