Reactjs 磁带/笑话不识别测试用例

Reactjs 磁带/笑话不识别测试用例,reactjs,redux-saga,create-react-app,redux-saga-test-plan,Reactjs,Redux Saga,Create React App,Redux Saga Test Plan,使用create react app创建了一个应用程序。 我使用建议的约定设置了一个测试文件。但是当我运行npm测试时 似乎,我的测试用例没有被识别 FAIL src\_tests_\saga.test.js ? Test suite failed to run Your test suite must contain at least one test. at onResult (node_modules\jest\node_modules\jest-cli\b

使用create react app创建了一个应用程序。 我使用建议的约定设置了一个测试文件。但是当我运行npm测试时 似乎,我的测试用例没有被识别

 FAIL  src\_tests_\saga.test.js
  ? Test suite failed to run

    Your test suite must contain at least one test.

      at onResult (node_modules\jest\node_modules\jest-cli\build\TestRunner.js:1
89:18)
      at process._tickCallback (internal\process\next_tick.js:103:7)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.941s
Ran all test suites.

Watch Usage
 > Press o to only run tests related to changed files.
 > Press p to filter by a filename regex pattern.
 > Press q to quit watch mode.
 > Press Enter to trigger a test run.
TAP version 13
# testflow Saga test
ok 1 take testflow
ok 2 test state should be false
ok 3 Must call bye

您应该粘贴saga.test.jsI中的一些代码,即使在添加了测试用例descripe('Addition',()=>{it('knows that 2 and 2 make 4',()=>{expect(2+2).toBe(4);};});测试套件无法运行您的测试套件必须至少包含一个测试。在进程的onResult(node_modules\jest cli\build\TestRunner.js:192:18)上。_tickCallback(internal\process\next_tick.js:109:7)找到了解决方案,目前正在为我工作。@AshwinHegde谢谢。成功了。不知道如何接受你的答案。我只是投了更高的票