Support should not send coverage unless plugins task has been registered
See original GitHub issuein a situation where a support file has been registered BUT there is no task in the plugins file, we should not try to call the coverage report task
Example situation
{
"pluginsFile": false,
"supportFile": "node_modules/cypress-react-unit-test/support"
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
javascript - How to register cypress `code-coverage` plugin ...
From your description the only step missing is the support file import. // cypress/support/e2e.js import '@cypress/code-coverage/support'.
Read more >@cypress/code-coverage - npm
This plugin DOES NOT instrument your code. ... If your application has been instrumented correctly, then you should see additional counters ...
Read more >Migration Guide | Cypress Documentation
Migrating to Cypress 12.0 This guide details the changes and how to change your code to migrate to Cypress version 12.0.
Read more >Java test coverage - SonarQube Documentation
SonarQube supports the reporting of test coverage as part of the analysis of your Java project. However, SonarQube does not generate the coverage...
Read more >JUnit 5 User Guide
However, you can still test code that has been compiled with ... Unlike JUnit 4's @Test annotation, this annotation does not declare any ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How do you keep the coverage tasks registered when using multiple config files as documented at https://docs.cypress.io/api/plugins/configuration-api#Customize-available-browsers?
In
plugins/index.js
as documented there:How do you incorporate
to register the coverage tasks on the returned config object? Config by file works but without coverage. Coverage works without config by file (i.e., just returning
config
). I can’t get both to work together…Is it possible for this to throw an error? I’ve been debugging for days why I’m not getting any coverage files in my CI workflow. Local tests didn’t give me anything either, and this warning was simply not visible: It was sheer happenstance that I ran a one-liner test on a local Cypress instance and saw this banner.
The end problem was that my
plugins
file’s default export wasn’t returningconfig
after I mutated it with@cypress/code-coverage
:This would have been so much easier to debug if CI had failed with an error that the code coverage task had not registered instead of failing silently.