當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript testing.TestBed類代碼示例

本文整理匯總了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();
 });
開發者ID:theAlgorithmist,項目名稱:Angular2CLI-D3,代碼行數:5,代碼來源:a2d3-bar.component.spec.ts

示例2: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     providers: [RecoverPasswordService]
   });
 });
開發者ID:camilolozano,項目名稱:finalAndroid2018-front,代碼行數:5,代碼來源:recover-password.service.spec.ts

示例3: it

 it(`should have as title 'app'`, async(() => {
   const fixture = TestBed.createComponent(AppComponent);
   const app = fixture.debugElement.componentInstance;
   expect(app.title).toEqual('app');
 }));
開發者ID:karpawar,項目名稱:primeng-crud-angular6,代碼行數:5,代碼來源:app.component.spec.ts

示例4: beforeEach

 beforeEach(() => {
     contributionService = TestBed.get(NoteContributionService);
     store = TestBed.get(Store);
     measurement = TestBed.get(NOTE_CONTRIBUTION_MEASUREMENT);
 });
開發者ID:suiruiw,項目名稱:geeks-diary,代碼行數:5,代碼來源:note-contribution.service.spec.ts

示例5: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(SearchComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
開發者ID:190408-usf-nec-java,項目名稱:Team3Proj2,代碼行數:5,代碼來源:search.component.spec.ts

示例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();
 }));
開發者ID:kensodemann,項目名稱:time-trax,代碼行數:6,代碼來源:task-timer-editor.component.spec.ts

示例8: beforeEach

 beforeEach(async(() => {
     TestBed.configureTestingModule({
         imports: [E2EImportsModule],
         declarations: [MediafileSlideComponent]
     }).compileComponents();
 }));
開發者ID:CatoTH,項目名稱:OpenSlides,代碼行數:6,代碼來源:mediafile-slide.component.spec.ts

示例9: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(ContentHeaderComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
開發者ID:TrietPham96,項目名稱:angularspree,代碼行數:5,代碼來源:content-header.component.spec.ts

示例10: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     providers: [MatchListResolverService]
   });
 });
開發者ID:mightymoose,項目名稱:mmoaig,代碼行數:5,代碼來源:match-list-resolver.service.spec.ts


注:本文中的@angular/core/testing.TestBed類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。