()
| 198 | } |
| 199 | |
| 200 | private _checkFakeTimers() { |
| 201 | if (!this._fakingTime) { |
| 202 | this._global.console.warn( |
| 203 | 'A function to advance timers was called but the timers APIs are not replaced ' + |
| 204 | 'with fake timers. Call `jest.useFakeTimers()` in this test file or enable ' + |
| 205 | "fake timers for all tests by setting 'fakeTimers': {'enableGlobally': true} " + |
| 206 | `in Jest configuration file.\nStack Trace:\n${formatStackTrace( |
| 207 | // eslint-disable-next-line unicorn/error-message |
| 208 | new Error().stack!, |
| 209 | this._config, |
| 210 | {noStackTrace: false}, |
| 211 | )}`, |
| 212 | ); |
| 213 | } |
| 214 | |
| 215 | return this._fakingTime; |
| 216 | } |
| 217 | |
| 218 | private _toSinonFakeTimersConfig( |
| 219 | fakeTimersConfig: Config.FakeTimersConfig = {}, |
no test coverage detected