Skip to content

Add --watchAll=false to coverage docs #10033

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

Open
ianjmacintosh opened this issue Nov 6, 2020 · 3 comments
Open

Add --watchAll=false to coverage docs #10033

ianjmacintosh opened this issue Nov 6, 2020 · 3 comments

Comments

@ianjmacintosh
Copy link

Is your proposal related to a problem?

Yes, when I follow the instructions on https://create-react-app.dev/docs/running-tests/#coverage-reporting to run coverage reporting, I get an empty report. Others have reported this in #6888 #7838 #9322 #9876.

Describe the solution you'd like

Until this changes, I propose updating https://github.com/facebook/create-react-app/blame/master/docusaurus/docs/running-tests.md#L179 to prescribe npm test -- --coverage --watchAll=false

Describe alternatives you've considered

Ideally this behavior would be changed by the Jest team, but jestjs/jest#7331 doesn't seem to have much activity. Maybe there's another issue that's tracking it.

@ianjmacintosh
Copy link
Author

I've opened a PR for this, please let me know if this feature request is inappropriate and I'll close it.

@browniefed
Copy link

This should be default honestly, very confusing why it defaults to watch in the first place.

@axross
Copy link

axross commented Mar 11, 2021

Just for your information, in my environment, I reproduced the same problem but it outputs the full coverage reports when I manually pass --watchAll with --coverage.

🙅‍♂️ react-scripts test --coverage
🙆‍♂️ react-scripts test --coverage --watchAll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants