非同期呼び出しで AngularJS サービスをテストするために Karma + Mocha を使用しています。非同期呼び出しが完了したことをテストに伝えるにはどうすればよいですか。つまり、標準の Mocha done() 関数はどこに行くのでしょうか?
var should = chai.should();
describe('Services', function() {
beforeEach(angular.mock.module('myApp'));
describe('sampleService', function(){
it.only('should return some info', angular.mock.inject(function(sampleService) {
sampleService.get(function(data) {
data.should.equal('foo');
//done()
});
}));
});
});