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.
Versions
What is this plugin's version? If this is NOT the latest released version, can you try the latest version, please?
"@cypress/code-coverage": "3.12.45",
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. Appears to be working before this change.1cf7df2 Version 3.12.32
What is the Cypress version? "cypress": "12.14.0",
When running tests, if you open the web application in a regular browser and open DevTools, do you see window.__coverage__ object? Can you paste a screenshot?
Tests fail to run because of the error. But I see window.__coverage__ when running my server outside of cypress.
Is there a .nyc_output folder? Is there a .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? There is no output folder. Error prevents tests from running.
Do you have any custom NYC settings in package.json (nyc object) or in other NYC config files? No
Do you run Cypress tests in a Docker container? No
Describe the bug
support.js throws an error on const applicationSourceCoverage = win?.__coverage__. I am using a custom webpack loader. So this could simply be an issue with @jsdevtools/coverage-istanbul-loader not understanding how to handle "optional chaining operators". But I could be wrong. Webpack loaders are sort of new to me. Possibly I just need to use something besides @jsdevtools/coverage-istanbul-loader?
Logs and screenshots
![image](https://private-user-images.githubusercontent.com/1056684/358698230-0f4bd1fa-a25b-4b6a-8eeb-255facb137ef.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4NDQ3NTgsIm5iZiI6MTczODg0NDQ1OCwicGF0aCI6Ii8xMDU2Njg0LzM1ODY5ODIzMC0wZjRiZDFmYS1hMjViLTRiNmEtOGVlYi0yNTVmYWNiMTM3ZWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDZUMTIyMDU4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGY4NTk3MGUyYzZlYWU4YjRlYzZhZWY5NGZlNmE4YmNmODk5OGU1M2ZiN2Y0NTk2ZTg4ZjI5Nzg5YmM5NGI3OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.29Wyudd-U5GPdbB4zL_LkYihqr1fVIERk09NXEobsR8)
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.Versions
"@cypress/code-coverage": "3.12.45",
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.
Appears to be working before this change. 1cf7df2
Version 3.12.32
What is the Cypress version?
"cypress": "12.14.0",
What is your operating system?
Windows 11
What is the shell?
N/A
What is the Node version?
18.19.1
What is the NPM version?
10.2.4
How do you instrument your application? Cypress does not instrument web application code, so you must do it yourself.
I am using nyc
When running tests, if you open the web application in a regular browser and open DevTools, do you see
window.__coverage__
object? Can you paste a screenshot?Tests fail to run because of the error. But I see
window.__coverage__
when running my server outside of cypress.Is there a
.nyc_output
folder? Is there a.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?There is no output folder. Error prevents tests from running.
Do you have any custom NYC settings in
package.json
(nyc
object) or in other NYC config files?No
Do you run Cypress tests in a Docker container?
No
Describe the bug
support.js throws an error on
const applicationSourceCoverage = win?.__coverage__.
I am using a custom webpack loader. So this could simply be an issue with @jsdevtools/coverage-istanbul-loader not understanding how to handle "optional chaining operators". But I could be wrong. Webpack loaders are sort of new to me. Possibly I just need to use something besides@jsdevtools/coverage-istanbul-loader
?Also, I found this same issue reported on stackoverflow.
https://stackoverflow.com/questions/78483412/cypress-code-coverage-unexpected-token-win-coverage/78880561#78880561
coverage.webpack.js
Link to the repo
I currently have no repo. This is currently setup on an internal project. I can maybe make a repo if necessary.
The text was updated successfully, but these errors were encountered: