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.
create-react-app
comes with the necessary tools to start writing tests with no config. – Reber