@@ -152,7 +152,7 @@ describe('standalone components, directives, and pipes', () => {
152152 } ) ;
153153
154154
155- it ( 'should render a standalone component with dependenices and ambient providers' , ( ) => {
155+ it ( 'should render a standalone component with dependencies and ambient providers' , ( ) => {
156156 @Component ( {
157157 standalone : true ,
158158 template : 'Inner' ,
@@ -453,6 +453,34 @@ describe('standalone components, directives, and pipes', () => {
453453 expect ( fixture . nativeElement . innerHTML ) . toBe ( '<div red="true">blue</div>' ) ;
454454 } ) ;
455455
456+ it ( 'should support readonly arrays in @Component.imports' , ( ) => {
457+ @Directive ( { selector : '[red]' , standalone : true , host : { '[attr.red]' : 'true' } } )
458+ class RedIdDirective {
459+ }
460+
461+ @Pipe ( { name : 'blue' , pure : true , standalone : true } )
462+ class BluePipe implements PipeTransform {
463+ transform ( ) {
464+ return 'blue' ;
465+ }
466+ }
467+
468+ const DirAndPipe = [ RedIdDirective , BluePipe ] as const ;
469+
470+ @Component ( {
471+ selector : 'standalone' ,
472+ standalone : true ,
473+ template : `<div red>{{'' | blue}}</div>` ,
474+ imports : [ DirAndPipe ] ,
475+ } )
476+ class TestComponent {
477+ }
478+
479+ const fixture = TestBed . createComponent ( TestComponent ) ;
480+ fixture . detectChanges ( ) ;
481+ expect ( fixture . nativeElement . innerHTML ) . toBe ( '<div red="true">blue</div>' ) ;
482+ } ) ;
483+
456484 it ( 'should deduplicate declarations' , ( ) => {
457485 @Component ( { selector : 'test-red' , standalone : true , template : 'red(<ng-content></ng-content>)' } )
458486 class RedComponent {
0 commit comments