12

Although my tests run perfectly fine with

$ cross-env NODE_ENV=test nyc --require babel-register mocha

enter image description here

Everything is zero, and inside the ./coverage dir there is no coverage info too :(

My project is very basic (ES2015):

./lib.js
./test/lib.spec.js

Here is my .babelrc:

{
  "presets": [
    "es2015",
    "stage-0"
  ],
  "plugins": [
    "transform-decorators-legacy",
    "transform-class-properties"
  ],
  "env": {
    "test": {
      "plugins": [
        "istanbul"
      ]
    }
  }
}

and the .nycrc file

{
  "check-coverage": false,
  "lines": 99,
  "statements": 99,
  "functions": 99,
  "branches": 99,
  "include": [
    "./lib.js"
  ],
  "reporter": [
    "lcov",
  "text-summary"
  ],
  "require": [],
  "extension": [
    ".js"
  ],
  "cache": false,
  "all": false,
  "report-dir": "./coverage"
}

I've also made an identical setup using ES5 only with the same result. Any suggestions why I have no coverage ?

UPDATE: Solution can be found here

Towkir
  • 3,889
  • 2
  • 22
  • 41
Jeanluca Scaljeri
  • 26,343
  • 56
  • 205
  • 333

0 Answers0