From b52b1ea4a773c4a1415c33557eda11de29ff054e Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 1 Feb 2019 17:22:20 +0100 Subject: [PATCH] tweak check --- packages/jest-runtime/src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.', );