@@ -13,7 +13,7 @@ void main() {
13
13
14
14
it ('should extract expressions and attribute names with expressions' , () {
15
15
var info = extractDirectiveInfo ([
16
- new DirectiveMetadata ('FooComponent' , COMPONENT , 'foo-component' , {
16
+ new DirectiveMetadata ('FooComponent' , 'foo-component' , {
17
17
'barVal' : '@bar' ,
18
18
'baz-expr1' : '<=>baz1' ,
19
19
'baz-expr2' : '=>baz2' ,
@@ -37,9 +37,7 @@ void main() {
37
37
38
38
it ('should build a component selector if one is not explicitly specified' , () {
39
39
var info = extractDirectiveInfo ([
40
- new DirectiveMetadata ('MyFooComponent' , COMPONENT , 'my-foo' , {
41
- 'foo-expr' : '=>fooExpr'
42
- })
40
+ new DirectiveMetadata ('MyFooComponent' , 'my-foo' , {'foo-expr' : '=>fooExpr' })
43
41
]);
44
42
45
43
expect (info, hasLength (1 ));
@@ -48,9 +46,7 @@ void main() {
48
46
49
47
it ('should build an element directive selector if one is not explicitly specified' , () {
50
48
var info = extractDirectiveInfo ([
51
- new DirectiveMetadata ('MyFooDirective' , DIRECTIVE , 'my-foo' , {
52
- 'foo-expr' : '=>fooExpr'
53
- })
49
+ new DirectiveMetadata ('MyFooDirective' , 'my-foo' , {'foo-expr' : '=>fooExpr' })
54
50
]);
55
51
56
52
expect (info, hasLength (1 ));
@@ -59,9 +55,7 @@ void main() {
59
55
60
56
it ('should build an attr directive selector if one is not explicitly specified' , () {
61
57
var info = extractDirectiveInfo ([
62
- new DirectiveMetadata ('MyFooAttrDirective' , '[my-foo]' , '[my-foo]' , {
63
- 'foo-expr' : '=>fooExpr'
64
- })
58
+ new DirectiveMetadata ('MyFooAttrDirective' , '[my-foo]' , {'foo-expr' : '=>fooExpr' })
65
59
]);
66
60
67
61
expect (info, hasLength (1 ));
@@ -70,9 +64,7 @@ void main() {
70
64
71
65
it ('should figure out attribute name if dot(.) is used' , () {
72
66
var info = extractDirectiveInfo ([
73
- new DirectiveMetadata ('MyFooAttrDirective' , DIRECTIVE , '[my-foo]' , {
74
- '.' : '=>fooExpr'
75
- })
67
+ new DirectiveMetadata ('MyFooAttrDirective' , '[my-foo]' , {'.' : '=>fooExpr' })
76
68
]);
77
69
78
70
expect (flattenList (info, (DirectiveInfo i) => i.expressionAttrs),
@@ -81,9 +73,7 @@ void main() {
81
73
82
74
it ('should figure out attribute name from selector if dot(.) is used' , () {
83
75
var info = extractDirectiveInfo ([
84
- new DirectiveMetadata ('MyFooAttrDirective' , DIRECTIVE , '[blah][foo]' , {
85
- '.' : '=>fooExpr'
86
- })
76
+ new DirectiveMetadata ('MyFooAttrDirective' , '[blah][foo]' , {'.' : '=>fooExpr' })
87
77
]);
88
78
89
79
expect (flattenList (info, (DirectiveInfo i) => i.expressionAttrs),
@@ -92,9 +82,7 @@ void main() {
92
82
93
83
it ('should include exported expression attributes' , () {
94
84
var info = extractDirectiveInfo ([
95
- new DirectiveMetadata ('MyFooAttrDirective' , DIRECTIVE , '[blah][foo]' , {
96
- '.' : '=>fooExpr'
97
- }, ['baz' ])
85
+ new DirectiveMetadata ('MyFooAttrDirective' , '[blah][foo]' , {'.' : '=>fooExpr' }, ['baz' ])
98
86
]);
99
87
100
88
expect (flattenList (info, (DirectiveInfo i) => i.expressionAttrs),
@@ -103,13 +91,12 @@ void main() {
103
91
104
92
it ('should include exported expressions' , () {
105
93
var info = extractDirectiveInfo ([
106
- new DirectiveMetadata ('MyFooAttrDirective' , DIRECTIVE , '[blah][foo]' , {
107
- '.' : '=>fooExpr'
108
- }, null , ['ctrl.baz' ])
94
+ new DirectiveMetadata ('MyFooAttrDirective' , '[blah][foo]' , {'.' : '=>fooExpr' }, null ,
95
+ ['ctrl.baz' ])
109
96
]);
110
97
111
98
expect (flattenList (info, (DirectiveInfo i) => i.expressions),
112
- equals (['fooExpr' , 'ctrl.baz' ]));
99
+ equals (['fooExpr' , 'ctrl.baz' ]));
113
100
});
114
101
115
102
});
0 commit comments