@@ -111,27 +111,39 @@ describe('XmlParser', () => {
111111 } ) ;
112112 it ( 'should parse angular template' , ( ) => {
113113 const fragment = `<div someDirective #someRef></div>
114- <app-radio-group [formControl]="control">
115- <app-radio-button *ngFor="let item of dialogData.items" [value]="item">
114+ <app-radio-group [formControl]="control" [@myAnimation]="state" >
115+ <app-radio-button *ngFor="let item of dialogData.items" [value]="item" [@myAnimationWithoutState] >
116116 {{ displayLabel(item) }}
117117 </app-radio-button>
118118 </app-radio-group>
119119 <button type="button" (click)="confirmChoice()" i18n="@@APPLY_BUTTON">OK</button>
120120` ;
121121 const nodes = XmlParser . parseFragment ( fragment ) ;
122122
123- expect ( nodes . map ( n => n . toString ( ) ) . join ( '' ) ) . toEqual ( fragment ) ;
123+ expect ( nodes . map ( ( n ) => n . toString ( ) ) . join ( '' ) ) . toEqual ( fragment ) ;
124124 expect ( nodes ) . toEqual ( [
125- new XmlElement ( 'div' , [ new XmlAttribute ( 'someDirective' , '' , ' ' , '' , '' , '"' , false ) , new XmlAttribute ( '#someRef' , '' , ' ' , '' , '' , '"' , false ) ] , [ ] , '' ) ,
125+ new XmlElement (
126+ 'div' ,
127+ [
128+ new XmlAttribute ( 'someDirective' , '' , ' ' , '' , '' , '"' , false ) ,
129+ new XmlAttribute ( '#someRef' , '' , ' ' , '' , '' , '"' , false ) ,
130+ ] ,
131+ [ ] ,
132+ '' ,
133+ ) ,
126134 new XmlText ( '\n ' ) ,
127135 new XmlElement (
128136 'app-radio-group' ,
129- [ new XmlAttribute ( '[formControl]' , 'control' ) ] ,
137+ [ new XmlAttribute ( '[formControl]' , 'control' ) , new XmlAttribute ( '[@myAnimation]' , 'state' ) ] ,
130138 [
131139 new XmlText ( '\n ' ) ,
132140 new XmlElement (
133141 'app-radio-button' ,
134- [ new XmlAttribute ( '*ngFor' , 'let item of dialogData.items' ) , new XmlAttribute ( '[value]' , 'item' ) ] ,
142+ [
143+ new XmlAttribute ( '*ngFor' , 'let item of dialogData.items' ) ,
144+ new XmlAttribute ( '[value]' , 'item' ) ,
145+ new XmlAttribute ( '[@myAnimationWithoutState]' , '' , ' ' , '' , '' , '"' , false ) ,
146+ ] ,
135147 [ new XmlText ( '\n {{ displayLabel(item) }}\n ' ) ] ,
136148 '' ,
137149 false ,
0 commit comments