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

Unable to generate code coverage report #2783

Closed
chr1soscl opened this issue Apr 1, 2020 · 4 comments
Closed

Unable to generate code coverage report #2783

chr1soscl opened this issue Apr 1, 2020 · 4 comments
Labels
blocked: repro needed outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx

Comments

@chr1soscl
Copy link

Hello,
Recently we are experiencing an issue with the code coverage report, it is coming out empty, it is showing all the classes but the percentages are empty, these are my dev dependencies:

"@angular-devkit/build-angular": "^0.803.23",
    "@angular/cli": "8.0.0",
    "@angular/compiler-cli": "^8.0.0",
    "@angular/language-service": "^8.0.0",
    "@nrwl/jest": "8.1.0",
    "@nrwl/workspace": "8.1.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/jest": "24.0.9",
    "@types/node": "~8.9.4",
    "codelyzer": "~5.0.1",
    "dotenv": "6.2.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "jest": "24.1.0",
    "jest-junit": "7.0.0",
    "jest-preset-angular": "^7.1.1",
    "jest-zone-patch": "0.0.10",
    "prettier": "1.16.4",
    "protractor": "~5.4.0",
    "ts-jest": "24.0.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.4.5"

and this is my jest configuration:

module.exports = {
  testMatch: ['**/+(*.)+(spec|test).+(ts|js)?(x)'],
  transform: {
    '^.+\\.(ts|js|html)$': 'ts-jest'
  },
  resolver: '@nrwl/jest/plugins/resolver',
  moduleFileExtensions: ['ts', 'js', 'html'],
  collectCoverage: true,
  coverageReporters: ['html','json','text','cobertura','lcov'],
  reporters: [ 'default', 'jest-junit' ]  
};

CodeCoverage

@jaysoo jaysoo added the scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx label Apr 1, 2020
@FrozenPandaz
Copy link
Collaborator

FrozenPandaz commented Apr 2, 2020

Hi, is it possible for you to provide a repo with a minimal replication of the issue so we can debug the issue?

I tested this on https://github.com/nrwl/nx-examples by running nx test cart --code-coverage and had a proper coverage report generated. Is it possible that adding some of the other code coverage reporters corrupted the html coverage? Are the other coverage reports generated properly?

@ahnpnl
Copy link
Contributor

ahnpnl commented Apr 6, 2020

Hi guys for this issue pls follow this jestjs/jest#5739

@FrozenPandaz
Copy link
Collaborator

jestjs/jest#5739 is now closed and we don't have a repro in over a month so I'm going to close this issue. If you continue to run into this the issue please open a new issue with a repo exhibiting the behavior.

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
blocked: repro needed outdated scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx
Projects
None yet
Development

No branches or pull requests

4 participants