Skip to content

nyc coverage shows 0% #239

@ankitkhedekar

Description

@ankitkhedekar

i have been trying to use riteway, in one of my sideprojects. When trying to get it working with instanbul coverage report it shows 0% coverage.

I currently have only a single test.js file , it imports a class from another js file, and runs tests on it.

Output:


    ----------|---------|----------|---------|---------|-------------------
    File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
    ----------|---------|----------|---------|---------|-------------------
    All files |       0 |        0 |       0 |       0 |
    ----------|---------|----------|---------|---------|-------------------

  passed: 2,  failed: 0  of 2 tests  (4.1s)

package.json

   "test": "riteway -r @babel/register -r @babel/polyfill src/**/*-test.js",
    "coverage": "nyc npm run test  | tap-nirvana",

.babelrc

{
  "presets": [
    [
      "@babel/preset-env",
      {
        "targets": [
          "last 2 versions",
          "safari >= 7"
        ]
      }
    ],
  ],
  "plugins": ["istanbul"]
}

.nycrc

{
    "extends": "@istanbuljs/nyc-config-babel"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions