Skip to content

Coverage in HTML view is broken #9388

Closed
@adyz

Description

@adyz

🐛 Bug Report

To Reproduce

Steps to reproduce the behavior: (same as: https://jestjs.io/docs/en/getting-started)

  • Create a new folder
  • Init a new npm project with npm init
  • Add Jest as a dependency npm install --save-dev jest
  • Created a src folder with a main.js file and a main.spec.js test file (one containing sum function and the other the tests as in the Jest docs)
  • Added a test script in package.json.
  • Run the script with npm test -- --coverage
  • When opening the coverage/lcov-report/index.html the HTML does not show the coverage report numbers.

Screenshot

GIT repo here: https://github.com/adyz/jest-coverage-bug-no-ts

Expected behavior

The coverage/lcov-report/index.html should show the actual report numbers

Link to repl or repo (highly encouraged)

https://github.com/adyz/jest-coverage-bug-no-ts

envinfo

npx: installed 1 in 1.36s

  System:
    OS: macOS 10.15.2
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Binaries:
    Node: 13.6.0 - /usr/local/bin/node
    Yarn: 1.12.3 - ~/.yarn/bin/yarn
    npm: 6.13.4 - /usr/local/bin/npm
  npmPackages:
    jest: ^24.9.0 => 24.9.0 

Let me know if I should send this to the istanbul.js as well or just there. Not sure where to go from here.
I've also noticed that on old projects the report is fine until I remove the node_modules and reinstall.

Thanks a ton!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions