当前位置: 首页>>代码示例>>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;未经允许,请勿转载。