提交 0e9c092d 编写于 作者: W Winnie Hellmann

Fail correct test for Promise

上级 0b68b17c
......@@ -5,10 +5,13 @@ import { initializeTestTimeout } from './helpers/timeout';
process.on('unhandledRejection', global.promiseRejectionHandler);
// wait for pending setTimeout()s
afterEach(() => {
jest.runAllTimers();
});
afterEach(() =>
// give Promises a bit more time so they fail the right test
new Promise(setImmediate).then(() => {
// wait for pending setTimeout()s
jest.runAllTimers();
}),
);
initializeTestTimeout(300);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册