Skip to content

Commit 2638169

Browse files
committed
test(material/table): clean up unnecessary imports in tests
Removes imports from tests that aren't necessary anymore, because we're using standalone.
1 parent 5a33fda commit 2638169

File tree

3 files changed

+2
-40
lines changed

3 files changed

+2
-40
lines changed

src/material/table/table-data-source.spec.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
import {MatTableDataSource} from './table-data-source';
2-
import {waitForAsync, ComponentFixture, TestBed} from '@angular/core/testing';
2+
import {ComponentFixture, TestBed} from '@angular/core/testing';
33
import {MatSort, MatSortModule} from '@angular/material/sort';
4-
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
54
import {Component, ViewChild} from '@angular/core';
65

76
describe('MatTableDataSource', () => {
8-
beforeEach(waitForAsync(() => {
9-
TestBed.configureTestingModule({
10-
imports: [MatSortModule, NoopAnimationsModule, MatSortApp],
11-
});
12-
}));
13-
147
describe('sort', () => {
158
let dataSource: MatTableDataSource<any>;
169
let fixture: ComponentFixture<MatSortApp>;

src/material/table/table.spec.ts

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
11
import {AfterViewInit, Component, OnInit, ViewChild} from '@angular/core';
2-
import {
3-
waitForAsync,
4-
ComponentFixture,
5-
fakeAsync,
6-
flushMicrotasks,
7-
TestBed,
8-
tick,
9-
} from '@angular/core/testing';
2+
import {ComponentFixture, fakeAsync, flushMicrotasks, TestBed, tick} from '@angular/core/testing';
103
import {MatTable, MatTableDataSource, MatTableModule} from './index';
114
import {DataSource} from '@angular/cdk/table';
125
import {BehaviorSubject, Observable} from 'rxjs';
136
import {MatSort, MatSortHeader, MatSortModule} from '../sort';
147
import {MatPaginator, MatPaginatorModule} from '../paginator';
158

169
describe('MatTable', () => {
17-
beforeEach(waitForAsync(() => {
18-
TestBed.configureTestingModule({
19-
imports: [
20-
MatTableModule,
21-
MatPaginatorModule,
22-
MatSortModule,
23-
MatTableApp,
24-
MatTableWithWhenRowApp,
25-
ArrayDataSourceMatTableApp,
26-
NativeHtmlTableApp,
27-
MatTableWithSortApp,
28-
MatTableWithPaginatorApp,
29-
StickyTableApp,
30-
TableWithNgContainerRow,
31-
NestedTableApp,
32-
MatFlexTableApp,
33-
],
34-
});
35-
}));
36-
3710
describe('with basic data source', () => {
3811
it('should be able to create a table with the right content and without when row', () => {
3912
let fixture = TestBed.createComponent(MatTableApp);

src/material/table/testing/table-harness.spec.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ describe('MatTableHarness', () => {
1010
let loader: HarnessLoader;
1111

1212
beforeEach(() => {
13-
TestBed.configureTestingModule({
14-
imports: [MatTableModule, TableHarnessTest],
15-
});
16-
1713
fixture = TestBed.createComponent(TableHarnessTest);
1814
fixture.detectChanges();
1915
loader = TestbedHarnessEnvironment.loader(fixture);

0 commit comments

Comments
 (0)