Hi,
I am trying to write tests using the create react app example and am getting the following error:
To reproduce the error:
- `git clone https://github.com/Esri/jsapi-resources.git`
- npm i
- go to create-react-app example
- add `import Map from "@arcgis/core/Map";`
- replace "MapView" with "Map"
- `npm run test`
Any help would be much appreciated!
If you add new ArcGIS imports into modules you're testing or change them, you need to add new mocks as well. The mocks are located here.
You might be able to use transformIgnorePatterns, but I couldn't get it to work with CRA.
https://jestjs.io/docs/configuration#transformignorepatterns-arraystring
Might need some more jest config options. It works in this angular demo, but CRA complains about some stuff.