本文整理匯總了TypeScript中@angular/core/testing.TestBed類的典型用法代碼示例。如果您正苦於以下問題:TypeScript TestBed類的具體用法?TypeScript TestBed怎麽用?TypeScript TestBed使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TestBed類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: expect
TestBed.compileComponents().then(() => {
let app = TestBed.createComponent(A2d3BarAppComponent);
app.detectChanges();
expect(app).toBeTruthy();
});
示例2: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [RecoverPasswordService]
});
});
示例3: it
it(`should have as title 'app'`, async(() => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('app');
}));
示例4: beforeEach
beforeEach(() => {
contributionService = TestBed.get(NoteContributionService);
store = TestBed.get(Store);
measurement = TestBed.get(NOTE_CONTRIBUTION_MEASUREMENT);
});
示例5: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(SearchComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例6: it
it('should be created', () => {
const service: BsSlideAngularAgenciaCriaMaisService = TestBed.get(BsSlideAngularAgenciaCriaMaisService);
expect(service).toBeTruthy();
});
開發者ID:JeanPaulll,項目名稱:bs-slide-angular-agenciacriamais,代碼行數:4,代碼來源:bs-slide-angular-agencia-cria-mais.service.spec.ts
示例7: beforeEach
beforeEach(fakeAsync(() => {
fixture = TestBed.createComponent(TaskTimerEditorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
tick();
}));
示例8: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [E2EImportsModule],
declarations: [MediafileSlideComponent]
}).compileComponents();
}));
示例9: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(ContentHeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例10: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [MatchListResolverService]
});
});