I downloaded version 1.6 and my unit tests started failing. I even tried running the unit tests that came with the sample widget and they failed. I think there is an issue with jimu-for-test that comes with 1.6. It is not able to find the withTheme that comes with jimu-theme. Is everyone else having the same issue and not able to run unit test that came with the sample widget?
I had a second look at this and found some lines missing in jest.config.js for 1.6:
A moduleNameMapper is missing for jimu-theme:
"^jimu-theme$": "<rootDir>/dist/jimu-theme/index.js",
testEnvironment: "jsdom"
The test should now work again, at least for the sample widget.
A patch that fixes the unit tests issue is here: https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/patches/1.6/patch1/arcgis-experience-builder
thanks that allows me to run my tests.
Same here. I have had issues with jimu-ui when testing some of my custom widgets also in 1.5. About a month ago I opened this issue about it:
Some jimu-ui components breaks testing · Issue #102 · Esri/arcgis-experience-builder-sdk-resources (github.com)
thanks @GavinRehkemper
Thank you for your question @erniewise. I am also having that issue with the unit tests in the Simple widget. We're looking into this and will get back soon.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.