Lets say i have an angular module defined as
var app =
angular.module('app',[dependenceny1Module,dependenceny2Module,dependenceny3Module......])
where app is a module which depends on bulk of other modules. Now for unit
testing i can mock the module using
mock('app')
but i have to create dummy/mock modules for all dependency modules like
below
mockDependency1 = angular.module('dependency1Module')
mockDependency1 = angular.module('dependency2Module')
Or i have to load all the script files containing those modules.
I am wondering whats the best approach to mock out the dependency modules
here? especially when dependency modules are too many.
If i create the dummy module for dependency1Module ,then when i am done
with testing app and now want want to test dependency1Module itself , how
can i get back its original defintion ?
In general i want to know about the approach you guys have used in testing
modules when they have dependency on other modules defined in their
definitions.
Thanks
Rizwan
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.