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

update doc to warn potential partial coverage in watch mode #654

Merged
merged 1 commit into from
Jan 30, 2021

Conversation

connectdotz
Copy link
Collaborator

Noticed the coverage sometimes is incorrect in watch mode, depends on what files are changed and their relationship with the target file. It does make sense with the --watch flag that it will only run tests that changed and thus produce partial coverage sometimes. See more detailed discussion in jestjs/jest#1284.

In theory, we can pass --watchAll to ensure the coverage is correct, but it could have a significant performance implication especially for large projects. I don't recall many issues related to this kind of inconsistency, so not sure if it justifies the change/impact. One other possible solution is to introduce a customization flag for using --watchAll with coverage. Should be pretty straightforward if there are enough use cases.

Anyway, I ended up just updated the README to give a warning and corrected a bug I found during the investigation.

@coveralls
Copy link

coveralls commented Jan 28, 2021

Pull Request Test Coverage Report for Build 878

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.047%

Totals Coverage Status
Change from base Build 876: 0.0%
Covered Lines: 1144
Relevant Lines: 1254

💛 - Coveralls

@connectdotz connectdotz merged commit aefe66e into jest-community:master Jan 30, 2021
@connectdotz connectdotz deleted the watch-coverage branch January 30, 2021 02:51
legend1202 pushed a commit to legend1202/vscode-jest that referenced this pull request Jun 18, 2023
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

Successfully merging this pull request may close these issues.

2 participants