Skip to content

Commit

Permalink
fix(core): remove extra change detection on bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
trotyl committed Apr 1, 2018
1 parent bfb2cb2 commit 0911d03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ describe('ChangeDetectionScheduler', () => {
component = fixture.componentInstance;
});

it('should perform change detection in startup', inject([ChangeDetectionScheduler], (scheduler: ChangeDetectionScheduler) => {
expect(scheduler.schedule).toHaveBeenCalledTimes(1);
}));

it('should perform change detection after events', inject([ChangeDetectionScheduler], (scheduler: ChangeDetectionScheduler) => {
it('should perform change detection after markForCheck', inject([ChangeDetectionScheduler], (scheduler: ChangeDetectionScheduler) => {
component.changeDetectorRef.markForCheck();
expect(scheduler.schedule).toHaveBeenCalledTimes(2);
expect(scheduler.schedule).toHaveBeenCalled();
}));
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,5 @@ export class ChangeDetectionSchedulerInitializer {
markForCheck.call(this);
scheduleTickIfNeeded();
};

scheduleTickIfNeeded();
}
}

0 comments on commit 0911d03

Please sign in to comment.