Clarify NYC configration location

Open Beginner friendly
#947 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
typescript

Research direction

Start by locating the documentation that describes NYC configuration and compare it with the mentioned package.json, .nycrc, nyc.config.js, and cypress/config.ts paths. Clarify that configuration belongs in the directory where the Cypress process runs, using the libs/foo/cypress example, and verify the wording against the shown Cypress command.

Written by the indexing model from the issue text.

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

Dominant language
TypeScript
Stars
445
Forks
115
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cypress-io/code-coverage

All issues in cypress-io/code-coverage

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.