(There is a related question here: Jasmine test does not see AngularJS module)
I just want to test a service without bootstrapping Angular.
I have look at so
I needed to test a directive that required another directive, Google Places Autocomplete, I was debating on whether I should just mock it... anyway this worked with out throwing any errors for the directive that required gPlacesAutocomplete.
describe('Test directives:', function() {
beforeEach(module(...));
beforeEach(module(...));
beforeEach(function() {
angular.module('google.places', [])
.directive('gPlacesAutocomplete',function() {
return {
require: ['ngModel'],
restrict: 'A',
scope:{},
controller: function() { return {}; }
};
});
});
beforeEach(module('google.places'));
});