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 a29bd91 commit bb44f29Copy full SHA for bb44f29
src/helpers.js
@@ -41,8 +41,13 @@ function runWithJestRealTimers(callback) {
41
}
42
43
44
-const jestFakeTimersAreEnabled = () =>
45
- typeof jest !== 'undefined' && runWithJestRealTimers(() => {}).usedFakeTimers
+function jestFakeTimersAreEnabled() {
+ // istanbul ignore else
46
+ if (typeof jest !== 'undefined') {
47
+ return runWithJestRealTimers(() => {}).usedFakeTimers
48
+ }
49
+ return false
50
+}
51
52
// we only run our tests in node, and setImmediate is supported in node.
53
// istanbul ignore next
0 commit comments