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

Code Coverage #160

Open
wolframhaussig opened this issue Aug 18, 2021 · 0 comments
Open

Code Coverage #160

wolframhaussig opened this issue Aug 18, 2021 · 0 comments

Comments

@wolframhaussig
Copy link

Hi,

I am trying to integrate Code Coverage into my screeps project(Mocha is already running fine). This is what I have so far:

  • installed dev dependencies
    • @istanbuljs/nyc-config-typescript
    • nyc
    • source-map-support
  • added to mocha.opts --require source-map-support/register
  • added new script: "coverage": "nyc npm run test"
  • added nyc config
  "nyc": {
    "extends": "@istanbuljs/nyc-config-typescript",
    "all": true,
    "require": [
      "ts-node/register"
    ],
    "excludes": [
      "**/*.d.ts"
    ],
    "reporter": [
      "text",
      "lcov"
    ]
  }

Now, when trying to run the coverage I get the following error:

An error occurred while trying to read the map file at F:\Workspace\screeps\dist\main.js.map
Error: ENOENT: no such file or directory, open 'F:\Workspace\screeps\dist\main.js.map'

This is true because the sourcemap is called main.js.map.js... Has anyone already got this to work and give me a hint what to do here?

Best regards
Wolfram

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