Skip to content

Commit

Permalink
chore(datepicker): fix test failure (angular#9015)
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto authored and josephperrott committed Jan 2, 2018
1 parent 6cc9738 commit 57e07e1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/datepicker/datepicker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ describe('MatDatepicker', () => {
expect(() => fixture.detectChanges()).not.toThrow();
});

it('should clear out the backdrop subscriptions on close', () => {
it('should clear out the backdrop subscriptions on close', fakeAsync(() => {
for (let i = 0; i < 3; i++) {
testComponent.datepicker.open();
fixture.detectChanges();
Expand All @@ -359,10 +359,11 @@ describe('MatDatepicker', () => {

backdrop.click();
fixture.detectChanges();
flush();

expect(testComponent.datepicker.close).toHaveBeenCalledTimes(1);
expect(testComponent.datepicker.opened).toBe(false);
});
}));
});

describe('datepicker with too many inputs', () => {
Expand Down

0 comments on commit 57e07e1

Please sign in to comment.