Open misaku opened 1 year ago
same question!
Not possible to unit Test.
Do as follow:
jest.mock('@react-google-maps/api', () => {
return {
withGoogleMap: (Component: any) => Component,
withScriptjs: (Component: any) => Component,
Marker: (props: any) => <div {...props} />,
GoogleMap: (props: any) => (
<div>
<div className="mock-google-maps" />
{props.children}
</div>
),
InfoWindow: (props: any) => <div {...props} />,
useLoadScript: () => ({
isLoaded: true
})
}
})
i cant understand how can i make test with jest.