question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No coverage when running in watch mode

See original GitHub issue

🐛 Bug Report

when I run jest --watch, I see unknown coverage.

To Reproduce

see Link repo.

Expected behavior

show correct coverage.

Link to repl or repo (highly encouraged)

jest-watch-coverage-bug

Run npx envinfo --preset jest

Paste the results here:

System:
    OS: macOS 10.14
    CPU: x64 Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
  Binaries:
    Node: 9.10.1 - /usr/local/bin/node
    npm: 6.4.1 - /usr/local/bin/npm
  npmPackages:
    jest: ^23.6.0 => 23.6.0 

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:65
  • Comments:39 (2 by maintainers)

github_iconTop GitHub Comments

28reactions
abierbaumcommented, Jul 13, 2019

I was able to get everything working fine by simply starting jest with watchAll. Then if I want to see the coverage for a single test I just use ‘p’ to match the pattern of the file name. Works great. Just confusing to know to use watchAll.

22reactions
EmilyRosinacommented, Nov 15, 2019

Seems like it’s back to not working for me, unsure if a release broke it or something, no idea 🤷‍♀️.

I can confirm what others say though --watch doesn’t work, --watchAll does. It’s a pita, but at least it works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jest watch with code coverage not working - Stack Overflow
I'm trying to run jest -- ...
Read more >
Jest CLI Options
The jest command line runner has a number of useful options. You can run jest --help to view all available options. Many of...
Read more >
Learn Snapshots, Watch Mode & Test Coverage
The "Snapshots, Watch Mode & Test Coverage" Lesson is part of the full, Intermediate React, v2 course featured in this preview video.
Read more >
Mocha - the fun, simple, flexible JavaScript test framework
browser support · simple async support, including promises · run Node.js tests in parallel · test coverage reporting · string diff support ·...
Read more >
vscode-jest - Visual Studio Marketplace
By default, the extension uses jest watch mode that automatically runs ... However, please note the coverage might not be exactly the same, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found