diff --git a/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx b/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx index 9411f1d56..abc064bfc 100644 --- a/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx +++ b/packages/enzyme-test-suite/test/ShallowWrapper-spec.jsx @@ -28,6 +28,7 @@ import { memo, Profiler, Suspense, + useCallback, } from './_helpers/react-compat'; import { describeIf, @@ -2031,6 +2032,46 @@ describe('shallow', () => { }); }); }); + + // TODO: fix in v16.6 and v16.7 + describeIf(is('>= 16.8'), 'avoids regressing #2200', () => { + const Home = lazy && lazy(() => new Promise(() => {})); + + const PageSwitchFallback = memo ? memo(() =>
) : {}; + PageSwitchFallback.displayName = 'PageSwitchFallback'; + + const PageSwitch = memo && memo(({ pageData }) => { + const renderPageComponent = useCallback ? useCallback(() => { + if (pageData === 'NOT_FOUND') return null; + + switch (pageData.key) { + case 'home': + return