Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

c8 report is directed to coverage/root which cant be resolved #466

Open
willyhalim opened this issue Apr 20, 2023 · 0 comments
Open

c8 report is directed to coverage/root which cant be resolved #466

willyhalim opened this issue Apr 20, 2023 · 0 comments

Comments

@willyhalim
Copy link

Node Version = 17.9.1
C8 Version: 7.13.0
Platform: Amazon Linux 2

i am trying to run coverage report of indendepent process using c8 ( assuming my test case will be written in java / using postman )

this is my .nycrc file

{
  "extends": "@istanbuljs/nyc-config-typescript",
  "check-coverage": true,
  "all": true,
  "parser-plugins": [
    "typescript",
    "decorators-legacy"
  ],
  "require": [
        "ts-node/register"
      ],
  "cache": false,
  "extension": [".ts",".js"],
   "exclude": [
       "node_modules/*.js",
       "node_modules/**",
       "**/node_modules/**",
       "node_modules/path-to-regexp/*.js",
       "node_modules/**/*.js",
       "tmp/**"
  ],
  "include" : ["apps/calculate/**","dist/apps/calculate/**"],
  "reporter": [
          "text",
          "text-summary",
          "lcov",
          "html"
        ],
  "report-dir": "coverage",
  "sourceMap": true,
  "instrument": true
}

My typescript application is located under apps/calculate/src/**

SourceMap looks like working as i can see coverage data as i pump more message through API but it cant find the original source code as it map to root folder .

root/src | 59.74 | 75 | 36.36 | 59.74 |
logger.js | 45.79 | 75 | 30 | 45.79 | 17-47,64-69,79-83,86-88,91-95,98-100,103-107
main.ts | 91.48 | 75 | 100 | 91.48 | 18-19,43-44

Any idea on these ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant