cypress-io / cypress-io/code-coverage

Clarify NYC configration location

Open
#947 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
445
Forks
115
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
The docs should be clearer that the nyc configuration, whether in the package.json, .nycrc, etc, needs to be in the same directory where the cypress process runs. For example, in my case, I have Cypress Component Tests setup in a pnpm / nx monorepo in `libs/foo/cypress`. In order for the NYC settings to take affect, the config needs to be in `libs/foo/cypress/package.json`, `libs/foo/cypress/nyc.config.js`, etc because that's where the process runs (`cypress run --component --config-file=cypress/config.ts`). The docs are ambiguous because it makes it seem like the correct place is `libs/foo/package.json` with the rest of the project's dependencies, but they'll never get picked up there. I had to dig through the code to figure this out

**Describe the solution you'd like**
Clearer documentation

**Describe alternatives you've considered**
n/a

**Additional context**
n/a

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.