Replies: 1 comment
-
mapbox/maplibre do not load under node. You may be able to get them to load with JSDOM mocking all the browser global objects, or you can look into something like https://github.com/mapbox/mapbox-gl-js-mock |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have this component where when the user selects a position on the map an
h3
tag appears informing the user they have selected said position:I'm just wandering how do you correctly mock the
Map
component provided byreact-map-gl
?This is my unit test so far:
I think I'm not mocking
react-map-gl
but I've tried so many things I honestly don't know what I'm doing wrong.Does anyone know how to mock it correctly?
Beta Was this translation helpful? Give feedback.
All reactions