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


TypeScript TestComponentBuilder.createAsync方法代碼示例

本文整理匯總了TypeScript中@angular/core/testing.TestComponentBuilder.createAsync方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript TestComponentBuilder.createAsync方法的具體用法?TypeScript TestComponentBuilder.createAsync怎麽用?TypeScript TestComponentBuilder.createAsync使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@angular/core/testing.TestComponentBuilder的用法示例。


在下文中一共展示了TestComponentBuilder.createAsync方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: inject

 return inject([TestComponentBuilder], (tb: TestComponentBuilder) => {
     tb.createAsync(component).then(fixture => {
       result(fixture);
     })
   })
開發者ID:peterjp80,項目名稱:BlogWeb,代碼行數:5,代碼來源:test-helpers.ts

示例2: it

 it('should render...', async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
   tcb.createAsync(results)
     .then((fixture: ComponentFixture<any>) => {
       fixture.detectChanges();
     });
 })));
開發者ID:ivanbportugal,項目名稱:bsearchclient,代碼行數:6,代碼來源:results.spec.ts

示例3:

 t.be(t.inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
   return tcb
     .createAsync(TestComponent)
     .then(f => rootTC = f);
 }));
開發者ID:ivannugo,項目名稱:angular2-seed-advanced,代碼行數:5,代碼來源:platform.directive.spec.ts

示例4: async

 async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
     tcb.createAsync(AdminSideNavComponent).then(fixture => {
         expect(fixture.componentInstance instanceof AdminSideNavComponent).toBe(true, 'should create AdminSideNavComponent');
     });
 })));    
開發者ID:QuinntyneBrown,項目名稱:hair-salon,代碼行數:5,代碼來源:admin-side-nav.component.spec.ts

示例5: beforeEach

 beforeEach(async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
   tcb.createAsync(CurrentUserComponent).then((_fixture_) => fixture = _fixture_);
 })));
開發者ID:petebacondarwin,項目名稱:angular2-webpack2-ngrx-starter,代碼行數:3,代碼來源:current-user.component.spec.ts

示例6: async

 async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
     tcb.createAsync(PageNotFoundComponent).then(fixture => {
         expect(fixture.componentInstance instanceof PageNotFoundComponent).toBe(true, 'should create PageNotFoundComponent');
     });
 })));    
開發者ID:QuinntyneBrown,項目名稱:hair-salon,代碼行數:5,代碼來源:page-not-found.component.spec.ts

示例7: beforeEach

 beforeEach(async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
   tcb.createAsync(LoginButtonsComponent).then((_fixture_) => fixture = _fixture_);
 })));
開發者ID:petebacondarwin,項目名稱:angular2-webpack2-ngrx-starter,代碼行數:3,代碼來源:login-buttons.component.spec.ts

示例8: async

 async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
     tcb.createAsync(DigitalAssetUploadComponent).then(fixture => {
         expect(fixture.componentInstance instanceof DigitalAssetUploadComponent).toBe(true, 'should create DigitalAssetUploadComponent');
     });
 })));    
開發者ID:QuinntyneBrown,項目名稱:hair-salon,代碼行數:5,代碼來源:digital-asset-upload.component.spec.ts

示例9: it

 it('should say hello world', async(() => {
   builder.createAsync(HelloWorld).then((fixture: ComponentFixture<HelloWorld>) => {
     fixture.detectChanges();
     expect(fixture.nativeElement.innerHTML.trim()).to.equal('Hello world from the angular firebase-ui module!');
   });
 }));
開發者ID:ackushiw,項目名稱:ng2-firebase-ui,代碼行數:6,代碼來源:helloWorld.component.spec.ts

示例10: async

    async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {

      tcb.createAsync(WelcomeComponent).then(fixture => {
        expect(fixture.componentInstance.pageTitle).toBe('Welcome', 'page title should be Welcome');
      });
    })));
開發者ID:acewatson,項目名稱:angular2-testing,代碼行數:6,代碼來源:welcome.component.spec.ts


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