I need help to find code coverage.
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 -- --coverage. this is showing empty code coverage. Can any please help me to find where I am missing.
PASS src/__tests__/App.test.js
✓ renders without crashing (2ms)
----------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
----------|----------|----------|----------|----------|-------------------|
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 0.17s, estimated 1s
Ran all test suites.
Watch Usage: Press w to show more.
https://github.com/facebook/create-react-app/issues/6888
Just add flag --watchAll=false to your npm run test -- --coverage
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With