diff --git a/packages/react-reconciler/src/ReactFiberHooks.new.js b/packages/react-reconciler/src/ReactFiberHooks.new.js index 92a71d2f82d5a..67c148ddc0171 100644 --- a/packages/react-reconciler/src/ReactFiberHooks.new.js +++ b/packages/react-reconciler/src/ReactFiberHooks.new.js @@ -1248,7 +1248,7 @@ function mountEffect( ): void { if (__DEV__) { // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { + if (typeof jest !== 'undefined') { warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber); } } @@ -1276,7 +1276,7 @@ function updateEffect( ): void { if (__DEV__) { // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { + if (typeof jest !== 'undefined') { warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber); } } @@ -1771,7 +1771,7 @@ function dispatchAction( } if (__DEV__) { // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests - if ('undefined' !== typeof jest) { + if (typeof jest !== 'undefined') { warnIfNotScopedWithMatchingAct(fiber); warnIfNotCurrentlyActingUpdatesInDev(fiber); }