code-coverage icon indicating copy to clipboard operation
code-coverage copied to clipboard

Does not support setting custom "temp-dir"

Open jhpedemonte opened this issue 5 years ago • 0 comments

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"
    ]
  }

jhpedemonte avatar Jul 14 '20 01:07 jhpedemonte