code-coverage
code-coverage copied to clipboard
Does not support setting custom "temp-dir"
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
tempDirfrom the config: https://github.com/cypress-io/code-coverage/blob/70f804f1f4e8b5ece865fa11979b8e84a2721d7a/task.js#L177 nycconfig docs (mentioningtemp-dirconfig 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"
]
}