cypress-io / cypress-io/code-coverage

Does not support setting custom "temp-dir"

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

Description

**Describe the bug**

The code specifically sets `nyc`'s `tempDir` to `.nyc_output/`, ignoring the setting of `temp-dir` in the `nyc` config.

- Code that sets to `.nyc_output`: https://github.com/cypress-io/code-coverage/blob/70f804f1f4e8b5ece865fa11979b8e84a2721d7a/task.js#L19-L23
- Code that overrides `tempDir` from the config: https://github.com/cypress-io/code-coverage/blob/70f804f1f4e8b5ece865fa11979b8e84a2721d7a/task.js#L177
- `nyc` config docs (mentioning `temp-dir` config option): https://github.com/istanbuljs/nyc#common-configuration-options

An example `nyc` config from my `package.json`:

```
"nyc": {
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"report-dir": "./cypress-coverage",
"temp-dir": "./cypress-coverage/.nyc_output",
"reporter": [
"text-summary",
"json",
"html"
]
}
```

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.