nyc: Regression: nyc 15 creates output folder in wrong location and doesn't create HTML report at all

Repo Steps

Execute npm test with the following configuration using nyc 15.0 (beta):

  "nyc": {
    "all": true,
    "exclude": [
      "**/index.ts",
      "**/*.d.ts",
      "**/*.js"
    ],
    "extension": [
      ".ts",
      ".tsx"
    ],
    "reporter": [
      "html"
    ],
    "report-dir": "../TypeScriptUnitTest/coverage",
    "temp-directory": "../TypeScriptUnitTest/.nyc_output"
  },
  "scripts": {
    "test": "nyc --cwd ../Application mocha -r ts-node/register -r source-map-support/register -r jsdom-global/register **/*.spec.ts"
  }

Expected Behavior

Creation of a folder TypeScriptUnitTest\.nyc_output\ with the raw nyc output and a folder TypeScriptUnitTest\coverage\ with the code coverage report.

Observed Behavior

The output folder is in the wrong location (Application\.nyc_output\) and the coverage\ folder isn’t created at all (so there is no report).

Notes

This is a regression since this setup has worked for over a year without any issues using nyc versions 12.0.2 and 14.1.1.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

That looks much better! 😃

image

image