esri-karma-tutorial icon indicating copy to clipboard operation
esri-karma-tutorial copied to clipboard

Show an example of how to mock dependencies

Open tomwayson opened this issue 8 years ago • 0 comments

Confusingly, the utility modules used as examples in this tutorial actually would be a good candidates for mocking, b/c they have so few dependencies, yet the tutorial demonstrates how to load and use actual dependencies in unit tests.

In some cases it's hard to mock all dependencies (like when testing widgets, where the average define() block has about 10+ dependencies from dojo, dijit, esri, etc).

This tutorial may be more useful if it demonstrated how to do one example of testing a widget w/o mocks, and one testing a utility module w/ mocks.

tomwayson avatar Apr 21 '16 18:04 tomwayson