Il go strait to it. Im writing unit tests for Angular front end application. This is what I have so far... app.js:
var app = angular.module('app', ['dependency1', 'dependency2', 'dependency3']);
Then to create a service I have:
app.factory('myService', ['serviceDependency', function(serviceDependency) {
...
});
How do I create/inject myService to be tested? When I do:
beforeEach(module("app"));
Jasmine screams at me about not finding dependencies, and I dont know how to mock them. (there are more than 3, like way more. :) )
beforeEach(inject(function(myService){}));
Does not work without doing the 'module' one first. Im stuck on this for 3 days googleing watching videos and I just cant find what I need, or I cant see it. First time writing for help, so do ask any questions if you feel I missed something, and you need more info.
ktnxbye
Edit:
Custom providers are created like so:
app.config(['customProvider', function(customProvider){
...
}]);
any suggestions on how to mock this?
ktnxbye