本文整理汇总了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();
}));
示例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"');
});
示例3: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(UsertrackedComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例4: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(RankRecipientsQuestionResponseComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例5: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(PendingTransactionsComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例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();
});
示例8: beforeEach
beforeEach(() => {
router = TestBed.get(Router);
authService = TestBed.get(AuthenticationService);
fixture = TestBed.createComponent(TestComponent);
fixture.detectChanges();
});
示例9: it
it("dispatches a request for data", () => {
spyOn(actions, "fetchExplore");
spyOn(store, "dispatch");
fixture.detectChanges();
expect(store.dispatch).toHaveBeenCalledWith(actions.fetchExplore());
});
示例10: beforeEach
beforeEach(() => {
fixture = TestBed.createComponent(AttendanceAverageDashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});