blob: ddf23cd97b40737d674806e7fedd03dd164e3727 (
plain)
1
2
3
4
5
6
7
|
/* useful for timing promises when jest fakeTimers are not reliable enough */
export default timeout =>
new Promise(resolve => {
jest.useRealTimers();
setTimeout(resolve, timeout);
jest.useFakeTimers();
});
|