Skip to content

Commit b58b7b4

Browse files
crisbetojosephperrott
authored andcommitted
chore: fix test leaking overlay elements (#11045)
1 parent c6ad1f8 commit b58b7b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/menu/menu.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,11 @@ describe('MatMenu', () => {
508508
});
509509

510510
it('should default to the "below" and "after" positions', () => {
511+
overlayContainer.ngOnDestroy();
511512
fixture.destroy();
512513
TestBed.resetTestingModule();
513514

514-
let newFixture = createComponent(SimpleMenu, [], [FakeIcon]);
515+
const newFixture = createComponent(SimpleMenu, [], [FakeIcon]);
515516

516517
newFixture.detectChanges();
517518
newFixture.componentInstance.trigger.openMenu();

0 commit comments

Comments
 (0)