react-google-maps-api
react-google-maps-api copied to clipboard
How can i make test?
i cant understand how can i make test with jest.
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
})
}
})