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


TypeScript ComponentFixture.detectChanges方法代码示例

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


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

示例1: beforeEach

 beforeEach(fakeAsync(() => {
   fixture = TestBed.createComponent(TaskTimerEditorComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
   tick();
 }));
开发者ID:kensodemann,项目名称:time-trax,代码行数:6,代码来源:task-timer-editor.component.spec.ts

示例2: it

 it('should have expected <h1> text', () => {
   fixture.detectChanges();
   const h1 = de.nativeElement;
   expect(h1.innerText).toMatch(/angular/i,
     '<h1> should say something about "Angular"');
 });
开发者ID:RandyWilkinson,项目名称:Ng2Sample,代码行数:6,代码来源:app.component.spec.ts

示例3: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(UsertrackedComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:cruzj6,项目名称:UpcomingGames,代码行数:5,代码来源:usertracked.component.spec.ts

示例4: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(RankRecipientsQuestionResponseComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:TEAMMATES,项目名称:teammates,代码行数:5,代码来源:rank-recipients-question-response.component.spec.ts

示例5: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(PendingTransactionsComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:iketheadore,项目名称:skycoin,代码行数:5,代码来源:pending-transactions.component.spec.ts

示例6: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(ProjectDetailOverviewComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:lehmamic,项目名称:EnterpriseApplicationConfigurationManager,代码行数:5,代码来源:project-detail-overview.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(UpcomingscholarshipComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:aqsach,项目名称:new_cramefrenzy,代码行数:5,代码来源:upcomingscholarship.component.spec.ts

示例8: beforeEach

 beforeEach(() => {
     router = TestBed.get(Router);
     authService = TestBed.get(AuthenticationService);
     fixture = TestBed.createComponent(TestComponent);
     fixture.detectChanges();
 });
开发者ID:Alfresco,项目名称:alfresco-ng2-components,代码行数:6,代码来源:logout.directive.spec.ts

示例9: it

 it("dispatches a request for data", () => {
   spyOn(actions, "fetchExplore");
   spyOn(store, "dispatch");
   fixture.detectChanges();
   expect(store.dispatch).toHaveBeenCalledWith(actions.fetchExplore());
 });
开发者ID:stephenbm,项目名称:habitat,代码行数:6,代码来源:explore.component.spec.ts

示例10: beforeEach

 beforeEach(() => {
   fixture = TestBed.createComponent(AttendanceAverageDashboardComponent);
   component = fixture.componentInstance;
   fixture.detectChanges();
 });
开发者ID:NGO-DB,项目名称:ndb-core,代码行数:5,代码来源:attendance-average-dashboard.component.spec.ts


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