We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0ed1ba commit 04455cdCopy full SHA for 04455cd
src/helpers.js
@@ -5,7 +5,9 @@ const globalObj = typeof window === 'undefined' ? global : window
5
// Currently this fn only supports jest timers, but it could support other test runners in the future.
6
function runWithRealTimers(callback) {
7
const usingJestFakeTimers =
8
- globalObj.setTimeout._isMockFunction && typeof jest !== 'undefined'
+ globalObj.setTimeout &&
9
+ globalObj.setTimeout._isMockFunction &&
10
+ typeof jest !== 'undefined'
11
12
if (usingJestFakeTimers) {
13
jest.useRealTimers()
0 commit comments