Skip to content

Commit 678e93e

Browse files
committed
test(material/dialog): clean up unnecessary imports in tests
Removes imports from tests that aren't necessary anymore, because we're using standalone.
1 parent 9310a98 commit 678e93e

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

src/material/dialog/dialog.spec.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import {
4747
MatDialogActions,
4848
MatDialogClose,
4949
MatDialogContent,
50-
MatDialogModule,
5150
MatDialogRef,
5251
MatDialogState,
5352
MatDialogTitle,
@@ -66,17 +65,6 @@ describe('MatDialog', () => {
6665

6766
beforeEach(fakeAsync(() => {
6867
TestBed.configureTestingModule({
69-
imports: [
70-
MatDialogModule,
71-
ComponentWithChildViewContainer,
72-
ComponentWithTemplateRef,
73-
PizzaMsg,
74-
ContentElementDialog,
75-
DialogWithInjectedData,
76-
DialogWithoutFocusableElements,
77-
DirectiveWithViewContainer,
78-
ComponentWithContentElementTemplateRef,
79-
],
8068
providers: [
8169
{provide: Location, useClass: SpyLocation},
8270
{provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}},
@@ -2035,7 +2023,6 @@ describe('MatDialog with a parent MatDialog', () => {
20352023

20362024
beforeEach(fakeAsync(() => {
20372025
TestBed.configureTestingModule({
2038-
imports: [MatDialogModule, ComponentThatProvidesMatDialog],
20392026
providers: [
20402027
{
20412028
provide: OverlayContainer,
@@ -2144,7 +2131,6 @@ describe('MatDialog with default options', () => {
21442131
};
21452132

21462133
TestBed.configureTestingModule({
2147-
imports: [MatDialogModule, ComponentWithChildViewContainer, DirectiveWithViewContainer],
21482134
providers: [
21492135
{provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: defaultConfig},
21502136
{provide: MATERIAL_ANIMATIONS, useValue: {animationsDisabled: true}},
@@ -2205,10 +2191,6 @@ describe('MatDialog with animations enabled', () => {
22052191
let viewContainerFixture: ComponentFixture<ComponentWithChildViewContainer>;
22062192

22072193
beforeEach(fakeAsync(() => {
2208-
TestBed.configureTestingModule({
2209-
imports: [MatDialogModule, ComponentWithChildViewContainer, DirectiveWithViewContainer],
2210-
});
2211-
22122194
dialog = TestBed.inject(MatDialog);
22132195
viewContainerFixture = TestBed.createComponent(ComponentWithChildViewContainer);
22142196
viewContainerFixture.detectChanges();
@@ -2259,10 +2241,6 @@ describe('MatDialog with explicit injector provided', () => {
22592241
let fixture: ComponentFixture<ModuleBoundDialogParentComponent>;
22602242

22612243
beforeEach(fakeAsync(() => {
2262-
TestBed.configureTestingModule({
2263-
imports: [MatDialogModule, ModuleBoundDialogParentComponent],
2264-
});
2265-
22662244
overlayContainerElement = TestBed.inject(OverlayContainer).getContainerElement();
22672245
fixture = TestBed.createComponent(ModuleBoundDialogParentComponent);
22682246
}));

src/material/dialog/dialog.zone.spec.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
inject,
1313
} from '@angular/core';
1414
import {ComponentFixture, TestBed, fakeAsync, flush} from '@angular/core/testing';
15-
import {MatDialog, MatDialogModule, MatDialogRef} from '../dialog';
15+
import {MatDialog, MatDialogRef} from '../dialog';
1616
import {Subject} from 'rxjs';
1717
import {MATERIAL_ANIMATIONS} from '../core';
1818

@@ -26,12 +26,6 @@ describe('MatDialog', () => {
2626

2727
beforeEach(fakeAsync(() => {
2828
TestBed.configureTestingModule({
29-
imports: [
30-
MatDialogModule,
31-
ComponentWithChildViewContainer,
32-
PizzaMsg,
33-
DirectiveWithViewContainer,
34-
],
3529
providers: [
3630
provideZoneChangeDetection(),
3731
{provide: Location, useClass: SpyLocation},

0 commit comments

Comments
 (0)