cypress-io / code-coverage

Saves the code coverage collected during Cypress tests
MIT License
433 stars 107 forks source link

Bug - test-utils.js needs updated when loading .nycrc.yaml files #680

Open tommyc38 opened 1 year ago

tommyc38 commented 1 year ago

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.

Screenshot 2023-08-11 at 8 55 51 AM

Versions

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 that is an excellent bug report example

Sinetheta commented 10 months ago

An alternative to a monkey-patch is to override the dependency

  "overrides": {
    "@cypress/code-coverage": {
      "js-yaml": "<4.0"
    }
  },

looks like the bump was made by a bot and code-coverage still works fine without it https://github.com/cypress-io/code-coverage/pull/371