When should I use $provide versus Jasmine Spies in my Angular JS Unit tests
I work on a large Angular App and initially we done a lot of our tests by using $provide to mock services. However we now have a lot of Jasmine Spies in our tests in order to stub and spy on services. i.e spyOn(myService, 'myMethod').andReturn 'myValue' Should we really be using $provide for this or are there cases where spying on a service is the best approach? In the Angular Tests they use spies for spying on Jquery which I would see as an external service. spyOn(jq.prototype, 'on'); $provide seems to be used more for internal services. module(function($provide){ $provide.provider('