From d7385e397e045d74dd2819656ea31d31fd68fe46 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Thu, 27 May 2021 11:27:33 +0200 Subject: [PATCH] Fix breakage regarding (set|clear)Immediate --- scripts/jest/setupTests.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/jest/setupTests.js b/scripts/jest/setupTests.js index abb358f817aa2..26f641effae88 100644 --- a/scripts/jest/setupTests.js +++ b/scripts/jest/setupTests.js @@ -310,4 +310,10 @@ if (process.env.REACT_CLASS_EQUIVALENCE_TEST) { }; require('jasmine-check').install(); + + if (typeof window !== 'undefined') { + // FIXME: Possible bug in jest 27 + legacy fake timers? + delete window.setImmediate; + delete window.clearImmediate; + } }