Unit testing in Cesium

Hello!

**I’d like to write unit test to my cesium application. I tried to set up with Jest and Jasmine but both framework throw error: **

ReferenceError: Cesium is not defined

Can someone point me to the right direction? How do you write unit tests in Cesium?

Thanks!

How are you importing Cesium? You should be able to include it as an npm module. A good example of this is in the gltf-pipeline repository:

https://github.com/AnalyticalGraphicsInc/gltf-pipeline

For example, here’s a unit test that uses Cesium:

https://github.com/AnalyticalGraphicsInc/gltf-pipeline/blob/master/specs/lib/ForEachSpec.js