Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 1095899

Browse files
crisbetommalerba
authored andcommitted
fix(chips): failing unit tests against Angular 1.3 (#10224)
Fixes a couple of chips tests which were failing against Angular 1.3.x due to a timeout that wasn't being flushed.
1 parent 89538d6 commit 1095899

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/chips/chips.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,8 @@ describe('<md-chips>', function() {
842842
expect(document.activeElement).toHaveClass('md-chip-content');
843843

844844
// At/after 300ms timeout, focus should be on the input
845-
$timeout.flush(1);
845+
$timeout.flush();
846+
846847
expect(document.activeElement.tagName.toUpperCase()).toEqual('INPUT');
847848

848849
// cleanup
@@ -864,7 +865,7 @@ describe('<md-chips>', function() {
864865
expect(document.activeElement).toHaveClass('md-chip-content');
865866

866867
// At/after custom timeout, focus should be on the input
867-
$timeout.flush(1);
868+
$timeout.flush();
868869
expect(document.activeElement.tagName.toUpperCase()).toEqual('INPUT');
869870

870871
// cleanup

0 commit comments

Comments
 (0)