diff --git a/packages/enzyme-test-suite/test/shared/methods/debug.jsx b/packages/enzyme-test-suite/test/shared/methods/debug.jsx index 7b126463b..6cc407720 100644 --- a/packages/enzyme-test-suite/test/shared/methods/debug.jsx +++ b/packages/enzyme-test-suite/test/shared/methods/debug.jsx @@ -113,40 +113,39 @@ export default function describeDebug({ 3 `); }); - }); - describe('full tree', () => { - function TransitionGroup({ children }) { return children; } - function CSSTransition({ children }) { return children; } - function Body({ imageToShow, switchImage }) { - const handlerClick = useCallback( - () => { - if (imageToShow === 1) { - return switchImage(2); - } - - return switchImage(1); - }, - [imageToShow, switchImage], - ); - - return ( -
- -
- ); - } - const BodyMemo = memo && memo(Body); + describeIf(is('>= 16.8'), 'full tree', () => { + function TransitionGroup({ children }) { return children; } + function CSSTransition({ children }) { return children; } + function Body({ imageToShow, switchImage }) { + const handlerClick = useCallback( + () => { + if (imageToShow === 1) { + return switchImage(2); + } + + return switchImage(1); + }, + [imageToShow, switchImage], + ); + + return ( +
+ +
+ ); + } + const BodyMemo = memo && memo(Body); - it('shows everything when not memoized', () => { - const wrapper = WrapRendered( {}} />); - expect(wrapper.debug()).to.equal(`
+ it('shows everything when not memoized', () => { + const wrapper = WrapRendered( {}} />); + expect(wrapper.debug()).to.equal(`
`); - }); + }); - it('shows everything when memoized', () => { - const wrapper = WrapRendered( {}} />); - expect(wrapper.debug()).to.equal(`
+ it('shows everything when memoized', () => { + const wrapper = WrapRendered( {}} />); + expect(wrapper.debug()).to.equal(`
`); + }); }); }); });