Skip to content

Commit 647c8ba

Browse files
committed
main - 678e93e test(material/dialog): clean up unnecessary imports in tests
1 parent 57f1d16 commit 647c8ba

File tree

7 files changed

+10
-32
lines changed

7 files changed

+10
-32
lines changed

docs-content/examples-highlighted/material/grid-list/grid-list-harness/grid-list-harness-example.spec-ts.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">TestbedHarnessEnvironment</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing/testbed&#x27;</span>;
33
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatGridListHarness</span>, <span class="hljs-title class_">MatGridTileHarness</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/grid-list/testing&#x27;</span>;
44
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">HarnessLoader</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing&#x27;</span>;
5-
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatGridListModule</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/grid-list&#x27;</span>;
65
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">GridListHarnessExample</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./grid-list-harness-example&#x27;</span>;
76

87
<span class="hljs-title function_">describe</span>(<span class="hljs-string">&#x27;GridListHarnessExample&#x27;</span>, <span class="hljs-function">() =&gt;</span> {
98
<span class="hljs-keyword">let</span> <span class="hljs-attr">fixture</span>: <span class="hljs-title class_">ComponentFixture</span>&lt;<span class="hljs-title class_">GridListHarnessExample</span>&gt;;
109
<span class="hljs-keyword">let</span> <span class="hljs-attr">loader</span>: <span class="hljs-title class_">HarnessLoader</span>;
1110

1211
<span class="hljs-title function_">beforeEach</span>(<span class="hljs-function">() =&gt;</span> {
13-
<span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">configureTestingModule</span>({
14-
<span class="hljs-attr">imports</span>: [<span class="hljs-title class_">MatGridListModule</span>, <span class="hljs-title class_">GridListHarnessExample</span>],
15-
});
1612
fixture = <span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">createComponent</span>(<span class="hljs-title class_">GridListHarnessExample</span>);
1713
fixture.<span class="hljs-title function_">detectChanges</span>();
1814
loader = <span class="hljs-title class_">TestbedHarnessEnvironment</span>.<span class="hljs-title function_">loader</span>(fixture);

docs-content/examples-highlighted/material/icon/icon-harness/icon-harness-example.spec-ts.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">TestbedHarnessEnvironment</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing/testbed&#x27;</span>;
33
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">HarnessLoader</span>, parallel} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing&#x27;</span>;
44
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">IconHarnessExample</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./icon-harness-example&#x27;</span>;
5-
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatIconModule</span>, <span class="hljs-title class_">MatIconRegistry</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/icon&#x27;</span>;
5+
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatIconRegistry</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/icon&#x27;</span>;
66
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatIconHarness</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/icon/testing&#x27;</span>;
77
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">DomSanitizer</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/platform-browser&#x27;</span>;
88

@@ -11,9 +11,6 @@
1111
<span class="hljs-keyword">let</span> <span class="hljs-attr">loader</span>: <span class="hljs-title class_">HarnessLoader</span>;
1212

1313
<span class="hljs-title function_">beforeEach</span>(<span class="hljs-function">() =&gt;</span> {
14-
<span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">configureTestingModule</span>({
15-
<span class="hljs-attr">imports</span>: [<span class="hljs-title class_">MatIconModule</span>],
16-
});
1714
<span class="hljs-keyword">const</span> registry = <span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">inject</span>(<span class="hljs-title class_">MatIconRegistry</span>);
1815
<span class="hljs-keyword">const</span> sanitizer = <span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">inject</span>(<span class="hljs-title class_">DomSanitizer</span>);
1916

docs-content/examples-highlighted/material/slider/slider-harness/slider-harness-example.spec-ts.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@
22
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">TestbedHarnessEnvironment</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing/testbed&#x27;</span>;
33
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatSliderHarness</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/slider/testing&#x27;</span>;
44
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">HarnessLoader</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/cdk/testing&#x27;</span>;
5-
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">MatSliderModule</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;@angular/material/slider&#x27;</span>;
65
<span class="hljs-keyword">import</span> {<span class="hljs-title class_">SliderHarnessExample</span>} <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;./slider-harness-example&#x27;</span>;
76

87
<span class="hljs-title function_">describe</span>(<span class="hljs-string">&#x27;SliderHarnessExample&#x27;</span>, <span class="hljs-function">() =&gt;</span> {
98
<span class="hljs-keyword">let</span> <span class="hljs-attr">fixture</span>: <span class="hljs-title class_">ComponentFixture</span>&lt;<span class="hljs-title class_">SliderHarnessExample</span>&gt;;
109
<span class="hljs-keyword">let</span> <span class="hljs-attr">loader</span>: <span class="hljs-title class_">HarnessLoader</span>;
1110

1211
<span class="hljs-title function_">beforeEach</span>(<span class="hljs-function">() =&gt;</span> {
13-
<span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">configureTestingModule</span>({
14-
<span class="hljs-attr">imports</span>: [<span class="hljs-title class_">MatSliderModule</span>, <span class="hljs-title class_">SliderHarnessExample</span>],
15-
});
1612
fixture = <span class="hljs-title class_">TestBed</span>.<span class="hljs-title function_">createComponent</span>(<span class="hljs-title class_">SliderHarnessExample</span>);
1713
fixture.<span class="hljs-title function_">detectChanges</span>();
1814
loader = <span class="hljs-title class_">TestbedHarnessEnvironment</span>.<span class="hljs-title function_">loader</span>(fixture);

docs-content/examples-source/material/grid-list/grid-list-harness/grid-list-harness-example.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
22
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
33
import {MatGridListHarness, MatGridTileHarness} from '@angular/material/grid-list/testing';
44
import {HarnessLoader} from '@angular/cdk/testing';
5-
import {MatGridListModule} from '@angular/material/grid-list';
65
import {GridListHarnessExample} from './grid-list-harness-example';
76

87
describe('GridListHarnessExample', () => {
98
let fixture: ComponentFixture<GridListHarnessExample>;
109
let loader: HarnessLoader;
1110

1211
beforeEach(() => {
13-
TestBed.configureTestingModule({
14-
imports: [MatGridListModule, GridListHarnessExample],
15-
});
1612
fixture = TestBed.createComponent(GridListHarnessExample);
1713
fixture.detectChanges();
1814
loader = TestbedHarnessEnvironment.loader(fixture);

docs-content/examples-source/material/icon/icon-harness/icon-harness-example.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
22
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
33
import {HarnessLoader, parallel} from '@angular/cdk/testing';
44
import {IconHarnessExample} from './icon-harness-example';
5-
import {MatIconModule, MatIconRegistry} from '@angular/material/icon';
5+
import {MatIconRegistry} from '@angular/material/icon';
66
import {MatIconHarness} from '@angular/material/icon/testing';
77
import {DomSanitizer} from '@angular/platform-browser';
88

@@ -11,9 +11,6 @@ describe('IconHarnessExample', () => {
1111
let loader: HarnessLoader;
1212

1313
beforeEach(() => {
14-
TestBed.configureTestingModule({
15-
imports: [MatIconModule],
16-
});
1714
const registry = TestBed.inject(MatIconRegistry);
1815
const sanitizer = TestBed.inject(DomSanitizer);
1916

docs-content/examples-source/material/slider/slider-harness/slider-harness-example.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ import {ComponentFixture, TestBed} from '@angular/core/testing';
22
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
33
import {MatSliderHarness} from '@angular/material/slider/testing';
44
import {HarnessLoader} from '@angular/cdk/testing';
5-
import {MatSliderModule} from '@angular/material/slider';
65
import {SliderHarnessExample} from './slider-harness-example';
76

87
describe('SliderHarnessExample', () => {
98
let fixture: ComponentFixture<SliderHarnessExample>;
109
let loader: HarnessLoader;
1110

1211
beforeEach(() => {
13-
TestBed.configureTestingModule({
14-
imports: [MatSliderModule, SliderHarnessExample],
15-
});
1612
fixture = TestBed.createComponent(SliderHarnessExample);
1713
fixture.detectChanges();
1814
loader = TestbedHarnessEnvironment.loader(fixture);

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/components-examples",
3-
"version": "21.0.0-next.0+sha-6997e5a",
3+
"version": "21.0.0-next.0+sha-678e93e",
44
"description": "Angular Components Examples",
55
"private": true,
66
"repository": {
@@ -259,15 +259,15 @@
259259
},
260260
"homepage": "https://github.com/angular/components#readme",
261261
"peerDependencies": {
262-
"@angular/cdk": "21.0.0-next.0+sha-6997e5a",
263-
"@angular/cdk-experimental": "21.0.0-next.0+sha-6997e5a",
262+
"@angular/cdk": "21.0.0-next.0+sha-678e93e",
263+
"@angular/cdk-experimental": "21.0.0-next.0+sha-678e93e",
264264
"@angular/core": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
265265
"@angular/common": "^21.0.0-0 || ^21.1.0-0 || ^21.2.0-0 || ^21.3.0-0 || ^22.0.0-0",
266-
"@angular/material": "21.0.0-next.0+sha-6997e5a",
267-
"@angular/material-experimental": "21.0.0-next.0+sha-6997e5a",
268-
"@angular/material-moment-adapter": "21.0.0-next.0+sha-6997e5a",
269-
"@angular/material-luxon-adapter": "21.0.0-next.0+sha-6997e5a",
270-
"@angular/material-date-fns-adapter": "21.0.0-next.0+sha-6997e5a"
266+
"@angular/material": "21.0.0-next.0+sha-678e93e",
267+
"@angular/material-experimental": "21.0.0-next.0+sha-678e93e",
268+
"@angular/material-moment-adapter": "21.0.0-next.0+sha-678e93e",
269+
"@angular/material-luxon-adapter": "21.0.0-next.0+sha-678e93e",
270+
"@angular/material-date-fns-adapter": "21.0.0-next.0+sha-678e93e"
271271
},
272272
"devDependencies": {
273273
"@angular/cdk": "workspace:*",

0 commit comments

Comments
 (0)