1
+ import { AsyncPipe } from '@angular/common' ;
1
2
import { CdkTableModule } from '@angular/cdk/table' ;
2
3
import { ChangeDetectorRef , Component , ElementRef , ViewChild } from '@angular/core' ;
3
4
import { waitForAsync , ComponentFixture , fakeAsync , flush , TestBed } from '@angular/core/testing' ;
@@ -12,8 +13,7 @@ describe('CdkSelection', () => {
12
13
13
14
beforeEach ( waitForAsync ( ( ) => {
14
15
TestBed . configureTestingModule ( {
15
- imports : [ CdkSelectionModule ] ,
16
- declarations : [ ListWithMultiSelection ] ,
16
+ imports : [ CdkSelectionModule , ListWithMultiSelection ] ,
17
17
} ) . compileComponents ( ) ;
18
18
} ) ) ;
19
19
@@ -239,8 +239,7 @@ describe('CdkSelection with multiple = false', () => {
239
239
240
240
beforeEach ( waitForAsync ( ( ) => {
241
241
TestBed . configureTestingModule ( {
242
- imports : [ CdkSelectionModule ] ,
243
- declarations : [ ListWithSingleSelection ] ,
242
+ imports : [ CdkSelectionModule , ListWithSingleSelection ] ,
244
243
} ) . compileComponents ( ) ;
245
244
} ) ) ;
246
245
@@ -305,8 +304,7 @@ describe('cdkSelectionColumn', () => {
305
304
306
305
beforeEach ( waitForAsync ( ( ) => {
307
306
TestBed . configureTestingModule ( {
308
- imports : [ CdkSelectionModule , CdkTableModule ] ,
309
- declarations : [ MultiSelectTableWithSelectionColumn ] ,
307
+ imports : [ CdkSelectionModule , CdkTableModule , MultiSelectTableWithSelectionColumn ] ,
310
308
} ) . compileComponents ( ) ;
311
309
} ) ) ;
312
310
@@ -400,8 +398,7 @@ describe('cdkSelectionColumn with multiple = false', () => {
400
398
401
399
beforeEach ( waitForAsync ( ( ) => {
402
400
TestBed . configureTestingModule ( {
403
- imports : [ CdkSelectionModule , CdkTableModule ] ,
404
- declarations : [ SingleSelectTableWithSelectionColumn ] ,
401
+ imports : [ CdkSelectionModule , CdkTableModule , SingleSelectTableWithSelectionColumn ] ,
405
402
} ) . compileComponents ( ) ;
406
403
} ) ) ;
407
404
@@ -454,6 +451,8 @@ describe('cdkSelectionColumn with multiple = false', () => {
454
451
</li>
455
452
}
456
453
</ul>` ,
454
+ standalone : true ,
455
+ imports : [ CdkSelectionModule , AsyncPipe ] ,
457
456
} )
458
457
class ListWithMultiSelection {
459
458
@ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -519,6 +518,8 @@ class ListWithMultiSelection {
519
518
</li>
520
519
}
521
520
</ul>` ,
521
+ standalone : true ,
522
+ imports : [ CdkSelectionModule , AsyncPipe ] ,
522
523
} )
523
524
class ListWithSingleSelection {
524
525
@ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -561,6 +562,8 @@ class ListWithSingleSelection {
561
562
cdkRowSelection [cdkRowSelectionValue]="row"></tr>
562
563
</table>
563
564
` ,
565
+ standalone : true ,
566
+ imports : [ CdkSelectionModule , CdkTableModule ] ,
564
567
} )
565
568
class MultiSelectTableWithSelectionColumn {
566
569
@ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -627,6 +630,8 @@ class MultiSelectTableWithSelectionColumn {
627
630
cdkRowSelection [cdkRowSelectionValue]="row"></tr>
628
631
</table>
629
632
` ,
633
+ standalone : true ,
634
+ imports : [ CdkSelectionModule , CdkTableModule ] ,
630
635
} )
631
636
class SingleSelectTableWithSelectionColumn {
632
637
@ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
0 commit comments