test coverage is empty - v3.0.0
See original GitHub issueIs this a bug report?
yes, test coverage is always empty
After updating react-scripts
to 3.0.0 test coverage is always empty, this worked before in v2.1.8
v2.1.8
v3.0.0
Did you try recovering your dependencies?
This happens after booting an app up using create react app using typescript create-react-app cra-coverage-example --typescript
Which terms did you search for in User Guide?
n/a
Environment
Environment Info:
System:
OS: macOS 10.14.4
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Binaries:
Node: 11.12.0 - ~/.nvm/versions/node/v11.12.0/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.7.0 - ~/.nvm/versions/node/v11.12.0/bin/npm
Browsers:
Chrome: 73.0.3683.103
Safari: 12.1
npmPackages:
react: ^16.8.6 => 16.8.6
react-dom: ^16.8.6 => 16.8.6
react-scripts: 3.0.0 => 3.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to Reproduce
- create-react-app cra-coverage-example --typescript
- yarn test --coverage
Expected Behavior
test coverage would be output
Actual Behavior
test coverage is always empty
Reproducible Demo
https://github.com/pete-redmond-cko/cra-coverage-example or you can spin up an app using create react app v.3.0.0 and run yarn test --coverage
Issue Analytics
- State:
- Created 4 years ago
- Reactions:19
- Comments:39 (2 by maintainers)
Top Results From Across the Web
Why Code Coverage in react app is empty? Tried using npm ...
I have just created a new app using the latest create-react-app. I am trying to find the code coverage using npm run test...
Read more >Code Coverage results empty (again) - Visual Studio Feedback
After upgrading to VS 16.8.0 Preview 3 the Code Coverage Results has stopped working in my .NET Core Unit Tests (5.0 rc1) (.NET...
Read more >Adding coverage to your repository - Codacy Quality docs
Generate coverage reports in a supported format and upload them to Codacy to monitor the code coverage of your repositories on Codacy.
Read more >Use code coverage for unit testing - .NET | Microsoft Learn
Code coverage is a measurement of the amount of code that is run by unit tests - either lines, branches, or methods. As...
Read more >Code coverage - utPLSQL-framework
To obtain information about code coverage for unit tests, ... the code that is being tested will be reported as not covered (coverage...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you turn off watch via: yarn test --coverage --watchAll=false
It will work properly. Looks like a Jest bug. @stipsan
Jest needs more Jest tests to test the Jest.