55 createMouseEvent ,
66 dispatchMouseEvent ,
77 wrappedErrorMessage ,
8- } from '../.. /cdk/testing/private' ;
8+ } from '@angular /cdk/testing/private' ;
99import { Component , ElementRef , ViewChild } from '@angular/core' ;
1010import { waitForAsync , ComponentFixture , fakeAsync , TestBed , tick } from '@angular/core/testing' ;
1111import { NoopAnimationsModule } from '@angular/platform-browser/animations' ;
@@ -35,8 +35,11 @@ describe('MatSort', () => {
3535
3636 beforeEach ( waitForAsync ( ( ) => {
3737 TestBed . configureTestingModule ( {
38- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
39- declarations : [
38+ imports : [
39+ MatSortModule ,
40+ MatTableModule ,
41+ CdkTableModule ,
42+ NoopAnimationsModule ,
4043 SimpleMatSortApp ,
4144 CdkTableMatSortApp ,
4245 MatTableMatSortApp ,
@@ -507,8 +510,13 @@ describe('MatSort', () => {
507510
508511 beforeEach ( waitForAsync ( ( ) => {
509512 TestBed . configureTestingModule ( {
510- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
511- declarations : [ MatSortWithoutExplicitInputs ] ,
513+ imports : [
514+ MatSortModule ,
515+ MatTableModule ,
516+ CdkTableModule ,
517+ NoopAnimationsModule ,
518+ MatSortWithoutExplicitInputs ,
519+ ] ,
512520 providers : [
513521 {
514522 provide : MAT_SORT_DEFAULT_OPTIONS ,
@@ -541,8 +549,13 @@ describe('MatSort', () => {
541549
542550 beforeEach ( waitForAsync ( ( ) => {
543551 TestBed . configureTestingModule ( {
544- imports : [ MatSortModule , MatTableModule , CdkTableModule , NoopAnimationsModule ] ,
545- declarations : [ MatSortWithoutInputs ] ,
552+ imports : [
553+ MatSortModule ,
554+ MatTableModule ,
555+ CdkTableModule ,
556+ NoopAnimationsModule ,
557+ MatSortWithoutInputs ,
558+ ] ,
546559 providers : [
547560 {
548561 provide : MAT_SORT_DEFAULT_OPTIONS ,
@@ -648,6 +661,8 @@ type SimpleMatSortAppColumnIds = 'defaultA' | 'defaultB' | 'overrideStart' | 'ov
648661 </div>
649662 </div>
650663 ` ,
664+ standalone : true ,
665+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
651666} )
652667class SimpleMatSortApp {
653668 latestSortEvent : Sort ;
@@ -728,6 +743,8 @@ class FakeDataSource extends DataSource<any> {
728743 <cdk-row *cdkRowDef="let row; columns: columnsToRender"></cdk-row>
729744 </cdk-table>
730745 ` ,
746+ standalone : true ,
747+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
731748} )
732749class CdkTableMatSortApp {
733750 @ViewChild ( MatSort ) matSort : MatSort ;
@@ -758,6 +775,8 @@ class CdkTableMatSortApp {
758775 <mat-row *matRowDef="let row; columns: columnsToRender"></mat-row>
759776 </mat-table>
760777 ` ,
778+ standalone : true ,
779+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
761780} )
762781class MatTableMatSortApp {
763782 @ViewChild ( MatSort ) matSort : MatSort ;
@@ -768,6 +787,8 @@ class MatTableMatSortApp {
768787
769788@Component ( {
770789 template : `<div mat-sort-header="a"> A </div>` ,
790+ standalone : true ,
791+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
771792} )
772793class MatSortHeaderMissingMatSortApp { }
773794
@@ -778,6 +799,8 @@ class MatSortHeaderMissingMatSortApp {}
778799 <div mat-sort-header="duplicateId"> A </div>
779800 </div>
780801 ` ,
802+ standalone : true ,
803+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
781804} )
782805class MatSortDuplicateMatSortableIdsApp { }
783806
@@ -787,6 +810,8 @@ class MatSortDuplicateMatSortableIdsApp {}
787810 <div mat-sort-header> A </div>
788811 </div>
789812 ` ,
813+ standalone : true ,
814+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
790815} )
791816class MatSortableMissingIdApp { }
792817
@@ -796,6 +821,8 @@ class MatSortableMissingIdApp {}
796821 <div mat-sort-header="a"> A </div>
797822 </div>
798823 ` ,
824+ standalone : true ,
825+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
799826} )
800827class MatSortableInvalidDirection { }
801828
@@ -810,6 +837,8 @@ class MatSortableInvalidDirection {}
810837 </div>
811838 </div>
812839 ` ,
840+ standalone : true ,
841+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
813842} )
814843class MatSortWithoutExplicitInputs {
815844 latestSortEvent : Sort ;
@@ -843,6 +872,8 @@ class MatSortWithoutExplicitInputs {
843872 </div>
844873 </div>
845874 ` ,
875+ standalone : true ,
876+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
846877} )
847878class MatSortWithArrowPosition {
848879 arrowPosition ?: 'before' | 'after' ;
@@ -862,6 +893,8 @@ class MatSortWithArrowPosition {
862893 </div>
863894 </div>
864895 ` ,
896+ standalone : true ,
897+ imports : [ MatSortModule , MatTableModule , CdkTableModule ] ,
865898} )
866899class MatSortWithoutInputs {
867900 @ViewChild ( MatSort ) matSort : MatSort ;
0 commit comments