1+ import { AsyncPipe } from '@angular/common' ;
12import { CdkTableModule } from '@angular/cdk/table' ;
23import { ChangeDetectorRef , Component , ElementRef , ViewChild } from '@angular/core' ;
34import { waitForAsync , ComponentFixture , fakeAsync , flush , TestBed } from '@angular/core/testing' ;
@@ -12,8 +13,7 @@ describe('CdkSelection', () => {
1213
1314 beforeEach ( waitForAsync ( ( ) => {
1415 TestBed . configureTestingModule ( {
15- imports : [ CdkSelectionModule ] ,
16- declarations : [ ListWithMultiSelection ] ,
16+ imports : [ CdkSelectionModule , ListWithMultiSelection ] ,
1717 } ) . compileComponents ( ) ;
1818 } ) ) ;
1919
@@ -239,8 +239,7 @@ describe('CdkSelection with multiple = false', () => {
239239
240240 beforeEach ( waitForAsync ( ( ) => {
241241 TestBed . configureTestingModule ( {
242- imports : [ CdkSelectionModule ] ,
243- declarations : [ ListWithSingleSelection ] ,
242+ imports : [ CdkSelectionModule , ListWithSingleSelection ] ,
244243 } ) . compileComponents ( ) ;
245244 } ) ) ;
246245
@@ -305,8 +304,7 @@ describe('cdkSelectionColumn', () => {
305304
306305 beforeEach ( waitForAsync ( ( ) => {
307306 TestBed . configureTestingModule ( {
308- imports : [ CdkSelectionModule , CdkTableModule ] ,
309- declarations : [ MultiSelectTableWithSelectionColumn ] ,
307+ imports : [ CdkSelectionModule , CdkTableModule , MultiSelectTableWithSelectionColumn ] ,
310308 } ) . compileComponents ( ) ;
311309 } ) ) ;
312310
@@ -400,8 +398,7 @@ describe('cdkSelectionColumn with multiple = false', () => {
400398
401399 beforeEach ( waitForAsync ( ( ) => {
402400 TestBed . configureTestingModule ( {
403- imports : [ CdkSelectionModule , CdkTableModule ] ,
404- declarations : [ SingleSelectTableWithSelectionColumn ] ,
401+ imports : [ CdkSelectionModule , CdkTableModule , SingleSelectTableWithSelectionColumn ] ,
405402 } ) . compileComponents ( ) ;
406403 } ) ) ;
407404
@@ -454,6 +451,8 @@ describe('cdkSelectionColumn with multiple = false', () => {
454451 </li>
455452 }
456453 </ul>` ,
454+ standalone : true ,
455+ imports : [ CdkSelectionModule , AsyncPipe ] ,
457456} )
458457class ListWithMultiSelection {
459458 @ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -519,6 +518,8 @@ class ListWithMultiSelection {
519518 </li>
520519 }
521520 </ul>` ,
521+ standalone : true ,
522+ imports : [ CdkSelectionModule , AsyncPipe ] ,
522523} )
523524class ListWithSingleSelection {
524525 @ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -561,6 +562,8 @@ class ListWithSingleSelection {
561562 cdkRowSelection [cdkRowSelectionValue]="row"></tr>
562563 </table>
563564 ` ,
565+ standalone : true ,
566+ imports : [ CdkSelectionModule , CdkTableModule ] ,
564567} )
565568class MultiSelectTableWithSelectionColumn {
566569 @ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
@@ -627,6 +630,8 @@ class MultiSelectTableWithSelectionColumn {
627630 cdkRowSelection [cdkRowSelectionValue]="row"></tr>
628631 </table>
629632 ` ,
633+ standalone : true ,
634+ imports : [ CdkSelectionModule , CdkTableModule ] ,
630635} )
631636class SingleSelectTableWithSelectionColumn {
632637 @ViewChild ( CdkSelection ) cdkSelection : CdkSelection < string > ;
0 commit comments