unit testing and e2e testing with cesium

Hey guys,
Thanks for your awesome tool! We love it here.
We are currently looking for a way to write unit tests for our code the uses cesium. We are writing mock objects for cesium so that we can test our code without actually initializing a cesium widget. This amounts to a rising number of mock objects for different things in cesium (collections, layers, scene and such..).
Is there a best practice for unit testing code that uses Cesium? Is there a framework for that?
And the second question is if there is any framework for e2e testing with Cesium which is a bit different from unit testing cause there we really want to init the cesium Widget and check that the stuff we want happend.

Thanks in advance,
Netanel.

Hi Netanel,

Why do you want to avoid initializing Cesium? Do you have a lot of fine-grained tests and you want them to run quickly?

In the Cesium unit tests, we do mock out a number of Cesium classes, but it is done on a case-by-case basis. We also have tests that only create a Scene, for example, instead of a Viewer widget (example).

Let us know if you write a Cesium testing library; we’re happy to list it as a Cesium plugin.

Patrick