小编Uma*_*pta的帖子

为什么反应应用程序中的代码覆盖率是空的?尝试使用 npm run test -- --coverage。但总是显示空代码覆盖率

我需要帮助来查找代码覆盖率。

我刚刚使用最新的 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 …
Run Code Online (Sandbox Code Playgroud)

code-coverage reactjs jestjs

9
推荐指数
2
解决办法
3236
查看次数

标签 统计

code-coverage ×1

jestjs ×1

reactjs ×1