Skip to content

Commit 1255139

Browse files
devversionmmalerba
authored andcommitted
test: menu test flaky due to missing animation flush (#17624)
One recently added test for the `menu` seems to miss a `tick` to flush the animation. This causes the `FakeAsyncTestZone` to report a pending timer on test completion.
1 parent 9ae3b63 commit 1255139

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/material/menu/menu.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,7 @@ describe('MatMenu', () => {
796796
fixture.detectChanges();
797797
fixture.componentInstance.trigger.openMenu();
798798
fixture.detectChanges();
799+
tick(500);
799800

800801
expect(document.activeElement).toBe(overlayContainerElement.querySelector('.mat-menu-panel'));
801802
}));

0 commit comments

Comments
 (0)