2

Created an app using create-react-app. I set up a test file with the suggested convention. But when I run npm test seems, my test case is not recognized.

 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
NSN
  • 740
  • 3
  • 9
  • 26
  • you should paste some code from saga.test.js – Fazal Rasel Apr 13 '17 at 06:28
  • I am getting the issue error, even after adding test cases describe('Addition', () => { it('knows that 2 and 2 make 4', () => { expect(2 + 2).toBe(4); }); }); Test suite failed to run Your test suite must contain at least one test. at onResult (node_modules\jest-cli\build\TestRunner.js:192:18) at process._tickCallback (internal\process\next_tick.js:109:7) – Ashwin Hegde Apr 19 '17 at 14:17
  • 1
    Found the solution as of now https://github.com/facebook/jest/issues/1054 and is working for me. – Ashwin Hegde Apr 19 '17 at 14:27
  • @AshwinHegde Thanks. That worked. Not sure how to accept your answer. I just upvoted it – NSN Apr 25 '17 at 09:36

0 Answers0