You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Logs and screenshots
Please provide debug logs by running Cypress from the terminal with DEBUG=code-coverage environment variable set, see the Debugging section of the README file.
Because this plugin requires accessing package.json in order to find nyc parameters, it does not work with the --project flag of Cypress. This is because it will look for package.json in the project directory, rather than the actual root directory where package.json lives.
If one tries to get sneaky and add a package.json into the project directory, this causes the code coverage to limit to only files in the project directory.
We are using the unit test plugin to allow writing tests that are co-located with the source files, and the Cypress config is in a separate directory, so that we can use Cypress separately for other integration testing use cases.
The only sane solution is to allow passing in an nyc config directly to the @cypress/code-coverage/task plugin. Requiring modifying package.json is all kinds of impossible-to-work-with.
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.
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?
Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files
Do you run Cypress tests in a Docker container?
Describe the bug
A clear and concise description of what the bug is.
Link to the repo
Bugs with a reproducible example, like an open source repo showing the bug, are the most likely to be resolved.
Example
See #217 that is an excellent bug report example
The text was updated successfully, but these errors were encountered:
I don't think I understand the situation. Can you make a public repo showing the problem? You don't need to put your code there, just some example code.
The reason is that this repo is testing the examples using --project ... subfolders. So to better understand what is happening I would love to see the actual code structure.
Logs and screenshots
Please provide debug logs by running Cypress from the terminal with
DEBUG=code-coverage
environment variable set, see the Debugging section of the README file.Because this plugin requires accessing package.json in order to find
nyc
parameters, it does not work with the--project
flag of Cypress. This is because it will look forpackage.json
in the project directory, rather than the actual root directory wherepackage.json
lives.If one tries to get sneaky and add a
package.json
into the project directory, this causes the code coverage to limit to only files in the project directory.We are using the unit test plugin to allow writing tests that are co-located with the source files, and the Cypress config is in a separate directory, so that we can use Cypress separately for other integration testing use cases.
The only sane solution is to allow passing in an nyc config directly to the
@cypress/code-coverage/task
plugin. Requiring modifying package.json is all kinds of impossible-to-work-with.Versions
window.__coverage__
object? Can you paste a screenshot?.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?package.json
(nyc
object) or in other NYC config filesDescribe the bug
A clear and concise description of what the bug is.
Link to the repo
Bugs with a reproducible example, like an open source repo showing the bug, are the most likely to be resolved.
Example
See #217 that is an excellent bug report example
The text was updated successfully, but these errors were encountered: