当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript TestBed.createComponent方法代码示例

本文整理汇总了TypeScript中@angular/core/testing.TestBed.createComponent方法的典型用法代码示例。如果您正苦于以下问题:TypeScript TestBed.createComponent方法的具体用法?TypeScript TestBed.createComponent怎么用?TypeScript TestBed.createComponent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在@angular/core/testing.TestBed的用法示例。


在下文中一共展示了TestBed.createComponent方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(OsdScrubModalComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:LenzGr,项目名称:ceph,代码行数:5,代码来源:osd-scrub-modal.component.spec.ts

示例2: fakeAsync

 fakeAsync(inject([Router, Location], (router: Router, location: Location) => {
   TestBed.createComponent(MyApp);
   router.navigate(['/']);
   tick();
   expect(location.path()).toBe('/');
 })
开发者ID:edicon,项目名称:angular2typescript,代码行数:6,代码来源:app.spec.ts

示例3: beforeEach

 beforeEach(() => {
     fixture = TestBed.createComponent(UserMgmtComponent);
     comp = fixture.componentInstance;
     service = fixture.debugElement.injector.get(UserService);
 });
开发者ID:Doha2012,项目名称:tutorials,代码行数:5,代码来源:user-management.component.spec.ts

示例4: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(AppComponent);
   comp = fixture.componentInstance;
   de = fixture.debugElement.query(By.css('h1'));
 });
开发者ID:RandyWilkinson,项目名称:Ng2Sample,代码行数:5,代码来源:app.component.spec.ts

示例5: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(UserPanelComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:Shreyansh028,项目名称:anytimelibrary,代码行数:5,代码来源:user-panel.component.spec.ts

示例6: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(CampoControlErroComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:Marcos3yk,项目名称:CursoAngular2,代码行数:5,代码来源:campo-control-erro.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(EnrichmentRegistrationComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:nguyenquan263,项目名称:SMS_System_Final,代码行数:5,代码来源:enrichment-registration.component.spec.ts

示例8: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(ClubDetailMainComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:Meistercoach83,项目名称:sfw,代码行数:5,代码来源:club-detail-main.component.spec.ts

示例9: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(LeoMessiPage);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:DiegoBinario,项目名称:EPE2_APP,代码行数:5,代码来源:leo-messi.page.spec.ts

示例10: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(PageNotFountComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:kiwi677,项目名称:usersystem,代码行数:5,代码来源:page-not-fount.component.spec.ts


注:本文中的@angular/core/testing.TestBed.createComponent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。