Basically, I\'m quite experienced with Mocha (written thousands of unit tests), and I\'m quite new to AngularJS (written just my first project).
Now I am wondering how I
One way of doing that is to use Angular
$injector in your tests:
myModule_test.js
suite('myModule', function(){
setup(function(){
var app = angular.module('myModule', []);
var injector = angular.injector(['myModule', 'ng']);
var service = injector.get('myService');
});
suite('myService', function(){
test('should return correct value', function(){
// perform test with an instance of service here
});
});
});
your html
should look similar to this:
myModule tests