diff --git a/packages/jest-runtime/src/index.js b/packages/jest-runtime/src/index.js index b05ddae6e24e..2580890b22a9 100644 --- a/packages/jest-runtime/src/index.js +++ b/packages/jest-runtime/src/index.js @@ -946,7 +946,9 @@ class Runtime { return jestObject; }; const _getFakeTimers = () => { - if (!this._environment.fakeTimers) { + if ( + !(this._environment.fakeTimers || this._environment.fakeTimersLolex) + ) { this._logFormattedReferenceError( 'You are trying to access a property or method of the Jest environment after it has been torn down.', );