本文整理汇总了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);
})
})
示例2: it
it('should render...', async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
tcb.createAsync(results)
.then((fixture: ComponentFixture<any>) => {
fixture.detectChanges();
});
})));
示例3:
t.be(t.inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
return tcb
.createAsync(TestComponent)
.then(f => rootTC = f);
}));
示例4: async
async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
tcb.createAsync(AdminSideNavComponent).then(fixture => {
expect(fixture.componentInstance instanceof AdminSideNavComponent).toBe(true, 'should create AdminSideNavComponent');
});
})));
示例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');
});
})));
示例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');
});
})));
示例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!');
});
}));
示例10: async
async(inject([TestComponentBuilder], (tcb: TestComponentBuilder) => {
tcb.createAsync(WelcomeComponent).then(fixture => {
expect(fixture.componentInstance.pageTitle).toBe('Welcome', 'page title should be Welcome');
});
})));