import { configure } from 'enzyme' ; import Adapter from '@wojtekmaj/enzyme-adapter-react-17' ; configure ( { adapter : new Adapter ( ) } ) ; jest . mock ( 'next/dynamic' , ( ) => ( func ) => { let component = null ; func ( ) . then ( ( module ) => { component = module . default ; } ) ; const DynamicComponent = ( ... args ) => component ( ... args ) ; DynamicComponent . displayName = 'LoadableComponent' ; DynamicComponent . preload = jest . fn ( ) ; return DynamicComponent ; } ) ;