@@ -10,104 +10,104 @@ main() {
1010 describe ('\$ interpolate' , () {
1111
1212 it ('should return undefined when there are no bindings and textOnly is set to true' ,
13- inject ( (Interpolate $interpolate) {
13+ (Interpolate $interpolate) {
1414 expect ($interpolate ('some text' , true )).toBe (null );
15- })) ;
15+ });
1616
17- it ('should suppress falsy objects' , inject ( (Interpolate $interpolate) {
17+ it ('should suppress falsy objects' , (Interpolate $interpolate) {
1818 expect ($interpolate ('{{undefined}}' )([null ])).toEqual ('' );
1919 expect ($interpolate ('{{undefined+undefined}}' )([null ])).toEqual ('' );
2020 expect ($interpolate ('{{null}}' )([null ])).toEqual ('' );
2121 expect ($interpolate ('{{a.b}}' )([null ])).toEqual ('' );
22- })) ;
22+ });
2323
24- it ('should jsonify objects' , inject ( (Interpolate $interpolate) {
24+ it ('should jsonify objects' , (Interpolate $interpolate) {
2525 expect ($interpolate ('{{ {} }}' )([{}])).toEqual ('{}' );
2626 expect ($interpolate ('{{ true }}' )([true ])).toEqual ('true' );
2727 expect ($interpolate ('{{ false }}' )([false ])).toEqual ('false' );
28- })) ;
28+ });
2929
3030
31- it ('should return interpolation function' , inject ( (Interpolate $interpolate, Scope rootScope) {
31+ it ('should return interpolation function' , (Interpolate $interpolate, Scope rootScope) {
3232 rootScope.context['name' ] = 'Misko' ;
3333 var fn = $interpolate ('Hello {{name}}!' );
3434 expect (fn (['Misko' ])).toEqual ('Hello Misko!' );
35- })) ;
35+ });
3636
3737
38- it ('should ignore undefined model' , inject ( (Interpolate $interpolate) {
38+ it ('should ignore undefined model' , (Interpolate $interpolate) {
3939 expect ($interpolate ("Hello {{'World' + foo}}" )(['World' ])).toEqual ('Hello World' );
40- })) ;
40+ });
4141
4242
43- it ('should use toString to conver objects to string' , inject ( (Interpolate $interpolate, Scope rootScope) {
43+ it ('should use toString to conver objects to string' , (Interpolate $interpolate, Scope rootScope) {
4444 expect ($interpolate ("Hello, {{obj}}!" )([new ToStringableObject ()])).toEqual ('Hello, World!' );
45- })) ;
45+ });
4646
4747
4848 describe ('parseBindings' , () {
49- it ('should Parse Text With No Bindings' , inject ( (Interpolate $interpolate) {
49+ it ('should Parse Text With No Bindings' , (Interpolate $interpolate) {
5050 var parts = $interpolate ("a" ).separators;
5151 expect (parts.length).toEqual (1 );
5252 expect (parts[0 ]).toEqual ("a" );
53- })) ;
53+ });
5454
55- it ('should Parse Empty Text' , inject ( (Interpolate $interpolate) {
55+ it ('should Parse Empty Text' , (Interpolate $interpolate) {
5656 var parts = $interpolate ("" ).separators;
5757 expect (parts.length).toEqual (1 );
5858 expect (parts[0 ]).toEqual ("" );
59- })) ;
59+ });
6060
61- it ('should Parse Inner Binding' , inject ( (Interpolate $interpolate) {
61+ it ('should Parse Inner Binding' , (Interpolate $interpolate) {
6262 var parts = $interpolate ("a{{b}}C" ).separators;
6363 expect (parts.length).toEqual (2 );
6464 expect (parts[0 ]).toEqual ("a" );
6565 expect (parts[1 ]).toEqual ("C" );
66- })) ;
66+ });
6767
68- it ('should Parse Ending Binding' , inject ( (Interpolate $interpolate) {
68+ it ('should Parse Ending Binding' , (Interpolate $interpolate) {
6969 var parts = $interpolate ("a{{b}}" ).separators;
7070 expect (parts.length).toEqual (2 );
7171 expect (parts[0 ]).toEqual ("a" );
7272 expect (parts[1 ]).toEqual ("" );
73- })) ;
73+ });
7474
75- it ('should Parse Begging Binding' , inject ( (Interpolate $interpolate) {
75+ it ('should Parse Begging Binding' , (Interpolate $interpolate) {
7676 var parts = $interpolate ("{{b}}c" ).separators;
7777 expect (parts.length).toEqual (2 );
7878 expect (parts[0 ]).toEqual ("" );
7979 expect (parts[1 ]).toEqual ("c" );
80- })) ;
80+ });
8181
82- it ('should Parse Loan Binding' , inject ( (Interpolate $interpolate) {
82+ it ('should Parse Loan Binding' , (Interpolate $interpolate) {
8383 var parts = $interpolate ("{{b}}" ).separators;
8484 expect (parts.length).toEqual (2 );
8585 expect (parts[0 ]).toEqual ("" );
8686 expect (parts[1 ]).toEqual ("" );
87- })) ;
87+ });
8888
89- it ('should Parse Two Bindings' , inject ( (Interpolate $interpolate) {
89+ it ('should Parse Two Bindings' , (Interpolate $interpolate) {
9090 var parts = $interpolate ("{{b}}{{c}}" ).separators;
9191 expect (parts.length).toEqual (3 );
9292 expect (parts[0 ]).toEqual ("" );
9393 expect (parts[1 ]).toEqual ("" );
9494 expect (parts[2 ]).toEqual ("" );
95- })) ;
95+ });
9696
97- it ('should Parse Two Bindings With Text In Middle' , inject ( (Interpolate $interpolate) {
97+ it ('should Parse Two Bindings With Text In Middle' , (Interpolate $interpolate) {
9898 var parts = $interpolate ("{{b}}x{{c}}" ).separators;
9999 expect (parts.length).toEqual (3 );
100100 expect (parts[0 ]).toEqual ("" );
101101 expect (parts[1 ]).toEqual ("x" );
102102 expect (parts[2 ]).toEqual ("" );
103- })) ;
103+ });
104104
105- it ('should Parse Multiline' , inject ( (Interpolate $interpolate) {
105+ it ('should Parse Multiline' , (Interpolate $interpolate) {
106106 var parts = $interpolate ('"X\n Y{{A\n +B}}C\n D"' ).separators;
107107 expect (parts.length).toEqual (2 );
108108 expect (parts[0 ]).toEqual ('"X\n Y' );
109109 expect (parts[1 ]).toEqual ('C\n D"' );
110- })) ;
110+ });
111111 });
112112 });
113113}
0 commit comments