Upgrading from CesiumJS 1.91 to 1.92+ causes jest tests to be unable to invoke the UrlTemplateImageryProvider constructor, the returned object is empty (all default values) when on 1.91 and lower it was populated.
Running in debugger we can see there is a stack trace error now which gives
Error: STACKTRACE TRACKING at getStacktraceWithUncaughtError (__project-path__\node_modules\zone.js\bundles\zone-testing-bundle.umd.js:3573:16)
However other constructors such as new Cesium.Resource(options) works perfectly fine, so I believe this is just something wrong with UrlTemplateImageryProvider.
We are using Angular 13, typescript 4.4.3, cesium 1.92 (error actually found at v1.101.0 then we rolled back) and jest 29.
To recreate, using CesiumJS 1.92 or higher and angular 13, create an angular component and then method which uses the new Cesium.UrlTemplateImageryProvider(options) constructor, then test this method in a jest test and see that the object returned has all default values, not taking on any attributes passed in such as resource new Cesium.Resource(options).
Thanks for any help :)
There is an error message that I can get through the debugger - this does not cause an app crash but the object remains unpopulated.
TypeError: Cannot read properties of undefined (reading 'length') at Object.get (__project-path__\node_modules\cesium\Build\CesiumUnminified\index.cjs:26966:30) at Object.<anonymous> (<anonymous>:1:26)
Upgrading from CesiumJS 1.91 to 1.92+ causes jest tests to be unable to invoke the UrlTemplateImageryProvider constructor, the returned object is empty (all default values) when on 1.91 and lower it was populated.
Running in debugger we can see there is a stack trace error now which gives
Error: STACKTRACE TRACKING at getStacktraceWithUncaughtError (__project-path__\node_modules\zone.js\bundles\zone-testing-bundle.umd.js:3573:16)
However other constructors such as new Cesium.Resource(options) works perfectly fine, so I believe this is just something wrong with UrlTemplateImageryProvider.
We are using Angular 13, typescript 4.4.3, cesium 1.92 (error actually found at v1.101.0 then we rolled back) and jest 29.
To recreate, using CesiumJS 1.92 or higher and angular 13, create an angular component and then method which uses the
new Cesium.UrlTemplateImageryProvider(options)
constructor, then test this method in a jest test and see that the object returned has all default values, not taking on any attributes passed in such as resourcenew Cesium.Resource(options)
.Thanks for any help :)
There is an error message that I can get through the debugger - this does not cause an app crash but the object remains unpopulated.
TypeError: Cannot read properties of undefined (reading 'length') at Object.get (__project-path__\node_modules\cesium\Build\CesiumUnminified\index.cjs:26966:30) at Object.<anonymous> (<anonymous>:1:26)
Sandcastle example:
Browser: Chrome
Operating System: Windows