Commit 0e9c092d authored by Winnie Hellmann's avatar Winnie Hellmann

Fail correct test for Promise

parent 0b68b17c
...@@ -5,10 +5,13 @@ import { initializeTestTimeout } from './helpers/timeout'; ...@@ -5,10 +5,13 @@ import { initializeTestTimeout } from './helpers/timeout';
process.on('unhandledRejection', global.promiseRejectionHandler); process.on('unhandledRejection', global.promiseRejectionHandler);
// wait for pending setTimeout()s afterEach(() =>
afterEach(() => { // give Promises a bit more time so they fail the right test
jest.runAllTimers(); new Promise(setImmediate).then(() => {
}); // wait for pending setTimeout()s
jest.runAllTimers();
}),
);
initializeTestTimeout(300); 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