File tree 2 files changed +2
-2
lines changed
packages/jest-fake-timers/src
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
### Fixes
8
8
9
+ - ` [jest-fake-timers] ` Lazily instantiate mock timers ([ #10551 ] ( https://github.com/facebook/jest/pull/10551 ) )
9
10
- ` [jest-runtime] ` ` require.main ` is no longer ` undefined ` when using ` jest.resetModules ` ([ #10626 ] ( https://github.com/facebook/jest/pull/10626 ) )
10
11
- ` [@jest/types] ` Add missing values for ` timers ` ([ #10632 ] ( https://github.com/facebook/jest/pull/10632 ) )
11
12
Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ export default class FakeTimers<TimerRef> {
94
94
} ;
95
95
96
96
this . reset ( ) ;
97
- this . _createMocks ( ) ;
98
97
}
99
98
100
99
clearAllTimers ( ) : void {
@@ -349,7 +348,7 @@ export default class FakeTimers<TimerRef> {
349
348
}
350
349
351
350
private _checkFakeTimers ( ) {
352
- if ( this . _global . setTimeout !== this . _fakeTimerAPIs . setTimeout ) {
351
+ if ( this . _global . setTimeout !== this . _fakeTimerAPIs ? .setTimeout ) {
353
352
this . _global . console . warn (
354
353
`A function to advance timers was called but the timers API is not ` +
355
354
`mocked with fake timers. Call \`jest.useFakeTimers()\` in this ` +
You can’t perform that action at this time.
0 commit comments