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?
Solved! Go to Solution.
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.
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.
thanks @GavinRehkemper
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:
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.
thanks that allows me to run my tests.
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/arcgi...