結論
- 設定ファイルでtimeoutの時間を伸ばす
- エラーログで丁寧に指示が出るのでそれ通りに
方法
// jest.config.js
module.exports = {
setupFilesAfterEnv: [
`${process.cwd()}/jest.setup.js`
]
}
// jest.setup.js
jest.setTimeout(30000);
参考
Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout