This is an example on how to test an angular 1.x service/factory which returns a promise and depends upon another service. ###How to run npm install bower install karma start