我需要帮助来查找代码覆盖率。
我刚刚使用最新的 create-react-app 创建了一个新应用程序。
我正在尝试使用npm run test -- --coverage. 这显示了空代码覆盖率。任何人都可以帮我找到我失踪的地方。
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.