I'm having some trouble understanding how to mock my module dependencies 
for unit testing.

I have a module declared like so...

var app = angular.module('myApp', ['ui.bootstrap', 'ngFileUpload']);

Now for testing my controllers I have to load up my module and all of it's 
dependencies, but I would want to mock out my modules dependencies when 
testing a controller. 

I've been searching the guides for how to mock a module dependency but came 
up with nothing. I've blindly tried to use *angular.mock.module...*

beforeEach(function() {
  angular.module.mock('ui.bootstrap');
  angular.module.mock('ngFileUpload');
  module('myApp');
});

but that still gives me the "Module 'ui.bootstrap' is not available!" error.

-- 
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/d/optout.

Reply via email to