I am trying to utilize the setView method in leaflet in a cypress test but having a web-pack error. I’m not sure how to import this correctly to be able to use it. In the main app everything is working correctly but I don’t understand how to utilize it in cypress. I am trying something simple just to start off and see if it works. Here it is.
import L from 'react-leaflet';
const map = L.map('mapid')
map.setView([4881264.780784771,-9929607.312884448], 2)
but it will not even load the cypress test and fails at
Error: Webpack Compilation Error
./cypress/integration/explorer/test.spec.js
Module not found: Error: Can't resolve 'react-leaflet' in '/Users/Documents/github/dashboards/cypress/tests'
Has anyone done this before?