使用create-react-app创建了一个应用。 我使用建议的约定设置了一个测试文件。但是当我运行 npm test 时 看来,我的测试用例无法识别。
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