cypress-io / cypress-io/code-coverage
Bug - test-utils.js needs updated when loading .nycrc.yaml files
- Dominant language
- TypeScript
- Stars
- 445
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
**Logs and screenshots**
Please provide debug logs by running Cypress from the terminal with `DEBUG=code-coverage` environment variable set, see the [Debugging](https://github.com/cypress-io/code-coverage#debugging) section of the README file.
**Versions**
- What is this plugin's version? If this is NOT the latest [released version](https://github.com/cypress-io/code-coverage/releases) 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](https://github.com/cypress-io/code-coverage/releases) between X and Y to see where the breaking change was.
- What is Cypress version? "cypress": "^12.17.3",
- What is your operating system?
I tried this locally (latest MacOS) as well as in my ci docker container with the same result:
cypress/browsers:node16.16.0-chrome107-ff107-edge
https://github.com/cypress-io/cypress-docker-images/tree/master/included - link to cypress/node images
image: cypress/included:12.3.0
- What is the shell? bash
- What is the Node version? 16.16.0
- What is the NPM version?
- How do you instrument your application? Cypress [does not instrument web application code](https://github.com/cypress-io/code-coverage#instrument-your-application), so you need to do it yourself. I do this with webpack config and confirm it works.
- 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](https://github.com/istanbuljs/nyc#configuration-files). Yes, I use a .nycrc.yaml file.
- Do you run Cypress tests in a Docker container? Yes, see above info on the docker image for my ci.
**Describe the bug**
My .nycrc.yaml file is blowing up cypress e2e tests. I have monkey patched test-utils.js to swap out `yaml.safeLoad` with `yaml.load` and everything works.
**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](https://github.com/cypress-io/code-coverage/issues/217) that is an excellent bug report example
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.