我在以下测试中出错。我的节点版本是:v12.10.0。有没有 setTimeout 的替代方案?
test('demo code', async () => {
const cc = await projectSetup(project);
const onNotification = jest.fn();
cc.sendNotification();
await waitForExpect(() => {
expect(onNotification).toHaveBeenCalledTimes(2);
});
});
Run Code Online (Sandbox Code Playgroud)
错误日志是
Call retries were exceeded
at ChildProcessWorker.initialize (../../../node_modules/jest-worker/build/workers/ChildProcessWorker.js:230:21)
Run Code Online (Sandbox Code Playgroud)