Skip to content
This repository has been archived by the owner on Jul 27, 2018. It is now read-only.

Show an example of how to mock dependencies #22

Open
tomwayson opened this issue Apr 21, 2016 · 0 comments
Open

Show an example of how to mock dependencies #22

tomwayson opened this issue Apr 21, 2016 · 0 comments

Comments

@tomwayson
Copy link
Owner

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant