Open shanytc opened 3 years ago
I ended up mocking react-simple-maps
and mocking ZoomableGroup
. Something like this
jest.mock('react-simple-maps', () => ({
...jest.requireActual('react-simple-maps'),
ZoomableGroup: ({ children }: ZoomableGroupProps): JSX.Element => <>{children}</>,
}))
Hey, I am trying to test the map using jest/enzyme, I am getting this error whenever I try to mount() my component.
It fails on d3-zoom.js when trying to access the viewBox
react code