@@ -379,19 +379,6 @@ export function main() {
379379 ] ) ;
380380 } ) ;
381381
382- it ( 'should locate directives in variable bindings' , ( ) => {
383- var dirA = CompileDirectiveMetadata . create (
384- { selector : '[a=b]' , exportAs : 'b' , type : new CompileTypeMetadata ( { name : 'DirA' } ) } ) ;
385- var dirB = CompileDirectiveMetadata . create (
386- { selector : '[b]' , type : new CompileTypeMetadata ( { name : 'DirB' } ) } ) ;
387- expect ( humanizeTemplateAsts ( parse ( '<div #a="b">' , [ dirA , dirB ] ) ) )
388- . toEqual ( [
389- [ ElementAst , 'div' , 'TestComp > div:nth-child(0)' ] ,
390- [ DirectiveAst , dirA , 'TestComp > div:nth-child(0)' ] ,
391- [ VariableAst , 'a' , 'b' , 'TestComp > div:nth-child(0)[#a=b]' ]
392- ] ) ;
393- } ) ;
394-
395382 it ( 'should parse directive host properties' , ( ) => {
396383 var dirA = CompileDirectiveMetadata . create ( {
397384 selector : 'div' ,
@@ -537,9 +524,10 @@ export function main() {
537524 it ( 'should assign variables to directives via exportAs' , ( ) => {
538525 var dirA = CompileDirectiveMetadata . create (
539526 { selector : '[a]' , type : new CompileTypeMetadata ( { name : 'DirA' } ) , exportAs : 'dirA' } ) ;
540- expect ( humanizeTemplateAsts ( parse ( '<div #a="dirA"></div>' , [ dirA ] ) ) )
527+ expect ( humanizeTemplateAsts ( parse ( '<div a #a="dirA"></div>' , [ dirA ] ) ) )
541528 . toEqual ( [
542529 [ ElementAst , 'div' , 'TestComp > div:nth-child(0)' ] ,
530+ [ AttrAst , 'a' , '' , 'TestComp > div:nth-child(0)[a=]' ] ,
543531 [ DirectiveAst , dirA , 'TestComp > div:nth-child(0)' ] ,
544532 [ VariableAst , 'a' , 'dirA' , 'TestComp > div:nth-child(0)[#a=dirA]' ]
545533 ] ) ;
@@ -566,9 +554,10 @@ There is no directive with "exportAs" set to "dirA" at TestComp > div:nth-child(
566554 type : new CompileTypeMetadata ( { name : 'DirA' } ) ,
567555 exportAs : 'dirA' , template : new CompileTemplateMetadata ( { ngContentSelectors : [ ] } )
568556 } ) ;
569- expect ( humanizeTemplateAsts ( parse ( '<div #a></div>' , [ dirA ] ) ) )
557+ expect ( humanizeTemplateAsts ( parse ( '<div a #a></div>' , [ dirA ] ) ) )
570558 . toEqual ( [
571559 [ ElementAst , 'div' , 'TestComp > div:nth-child(0)' ] ,
560+ [ AttrAst , 'a' , '' , 'TestComp > div:nth-child(0)[a=]' ] ,
572561 [ VariableAst , 'a' , '' , 'TestComp > div:nth-child(0)[#a=]' ] ,
573562 [ DirectiveAst , dirA , 'TestComp > div:nth-child(0)' ] ,
574563 [ VariableAst , 'a' , '' , 'TestComp > div:nth-child(0)[#a=]' ]
0 commit comments