Commit b3b96a00 authored by Winnie Hellmann's avatar Winnie Hellmann

Fail correct test for Promise

(cherry picked from commit 7fa09ad8fcb017e51a74dbd577c50139507a2958)
parent 992bdab7
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment