Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple fake/real time in waitFor()'s check
When running with fake timers, and when polling for promise to complete, make sure we do the poll in a short *real* time interval, independent of the fake time interval. This makes it possible to use long time intervals in fake time without needing to wait for the corresponding amount of real time passing. A unit test is added to illustrate this behaviour: with the previous code, this unit test would have taken over a minute to complete, now it is near instantaneous.
- Loading branch information