我想做以下事情:
describe('Questions', () => {
var rest: RestService;
var mockBackend: MockBackend;
beforeEach((done) => {
console.log('Executing before each');
inject([RestService, XHRBackend], (_rest: RestService, _mockBackend: MockBackend) => {
rest = _rest;
mockBackend = _mockBackend;
console.log('This never gets executed');
done();
});
});
....
回调注入永远不会被调用。我是否遗漏了什么,或者这必须是一个更复杂的解决方案?