****获取LoginInfoService无提供程序的问题*** //以下是ng2控制器组件的源代码。 LoginInfoService具有依赖注入服务,该服务位于ng1。
/// <reference path="../typings1/browser/definitions/jasmine/jasmine.d.ts" />
'use strict';
import {TestBed, async, inject} from "@angular/core/testing";
//import {it, describe, expect, beforeEach, inject} from 'angular2/testing';
import {UnificationCtrl} from './unificationCtrl';
import {LoginInfoService} from './LoginInfoService';
describe('UnificationCtrl.', () => {
beforeEach(() => {
TestBed.configureTestingModule(
{
// declarations: [UnificationCtrl],
providers: [
UnificationCtrl,
OverviewUnificationService,
StarUnification,
SessionKeeper,
LoginInfoService,
OverviewCommonConstants
]
});
});
beforeEach(inject([OverviewUnificationService, StarUnification, OverviewCommonConstants], (OverviewUnificationService, StarUnification, OverviewCommonConstants) => {
}));
it('test isPendingStatus()', inject([UnificationCtrl, StarUnification], (UnificationCtrl, StarUnification) => {
console.log('hi');
expect(StarUnification.stat`enter code here`us.Pending).toEqual('PENDING');
// WirelessUsageModel.setBonus(true);
// expect(WirelessUsageModel.hasBonus()).toBeTruthy();
}));
});