数据服务
var dataService = (function() {
function dataService($q, $resource, adalAuthenticationService) {
this.$q = $q;
this.$resource = $resource;
this.adal = new AuthenticationContext(adalAuthenticationService.config);
}
});

测试用例
describe("dataService UT Suite", function() {
var $q;
var $resource;
var adal;
var dataService;
beforeEach(module("Utils"));
beforeEach(inject(function($q, $resource, _adalAuthenticationService_, _dataService_) {
$q = _$q;
$resource = $resource;
adal = adalAuthenticationService;
dataService = _dataService _;
}));
});

上述服务代码,在typescript文件中写为名为dataService
的服务。
我无法在使用jasmine的单元测试中注入$resource
,adal
,dataService
你能告诉我如何解决这个问题。