Commit a6f0b72
Get setTimeout lazily (#20)
* Get setTimeout and Date.now lazily
This prevents from using old versions of setTimeout/Date.now
* Modify withFakeTimers unit test to cover the correct scenario
BREAKING CHANGE: If you combined fake timers with wait-for-expect that will most probably not work anymore. Please make an issue with your failing usecase, as we couldn't think of a situation where using wait-for-expect and fake timers in the same test would be necessary.1 parent e1962de commit a6f0b72
2 files changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 1 | | |
7 | 2 | | |
8 | 3 | | |
| |||
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
25 | | - | |
26 | | - | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
0 commit comments