本文整理匯總了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');
});
})));