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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run jest in --watch --coverage doesn't update coverage info when files change #8491

Closed
bugzpodder opened this issue May 23, 2019 · 4 comments

Comments

@bugzpodder
Copy link

bugzpodder commented May 23, 2019

馃悰 Bug Report

When files changes in watch mode, coverage info doesn't update.

To Reproduce

Steps to reproduce the behavior:

Run jest --watch --coverage, updates a file, see that no new coverage info gets updated.
Press 'a' to run all tests in watch mode, no coverage info shows up. @stipsan

Expected behavior

Coverage info shows up when I edit a file after starting watch mode, and when I press 'a' to show all tests.

Link to repl or repo (highly encouraged)

facebook/create-react-app#6888
Jest 24.8

@rmcsharry
Copy link

rmcsharry commented May 12, 2020

I am on Jest v25.27 and I still see this bug.

Even if I empty the coverage directory, it still only shows coverage of one file (always the same file!)

@chenesan Are you sure this has been fixed, because it seems not...

@chenesan
Copy link
Contributor

chenesan commented May 13, 2020

Hi @rmcsharry, My fix is on jest v25.5.4.
I only fixed the case that when test files change, jest will show the coverage of related source code, so this may not be your use case 馃槗
By the way, it seems that this issue closed before I fix it in #9769 , so I'm not sure if the problem is totally gone.

@rmcsharry
Copy link

@chenesan Thanks for the prompt reply. After I stopped and started the watcher a few times, it started working again and reports coverage correctly. Very odd. Let's hope it does not return. Maybe it was a cache issue.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants