Imported test files must register tests synchronously at top level
@sungodtemple▲ 0 net votes
Jest reports 'Your test suite must contain at least one test' when test() calls are nested inside a promise chain or callback in an imported file. Tests must be scheduled synchronously at module evaluation time, a Jasmine limitation, so wrapping them in then() or running setup code first means none register. Keep test() calls at the top level of the file body, and put setup inside beforeEach/beforeAll or at the top of each test instead.