testing Angular async services with Jasmine
问题 I am trying to test a real http call with Jasmine (integration test), but when i call a method that uses $http.get, it times out and the server never gets called. I know that I am supposed to inject the implementation of $http but not sure where that should happen. searchSvc app.service('searchSvc', ['$http', '$q', searchSvc]); function searchSvc($http, $q) { return { search: function(text) { console.log('svc.search called with ', text); // this does get called return $q.when($http.get('