@@ -177,22 +177,6 @@ describe('ngRepeat', function() {
177
177
} ) ;
178
178
179
179
180
- it ( 'should allow expressions over multiple lines' , function ( ) {
181
- scope . isTrue = function ( ) {
182
- return true ;
183
- } ;
184
- element = $compile (
185
- '<ul>' +
186
- '<li ng-repeat="item in items\n' +
187
- '| filter:isTrue">{{item.name}}</li>' +
188
- '</ul>' ) ( scope ) ;
189
- scope . items = [ { name : 'igor' } ] ;
190
- scope . $digest ( ) ;
191
-
192
- expect ( element . find ( 'li' ) . text ( ) ) . toBe ( 'igor' ) ;
193
- } ) ;
194
-
195
-
196
180
it ( 'should track using provided function when a filter is present' , function ( ) {
197
181
scope . newArray = function ( items ) {
198
182
var newArray = [ ] ;
@@ -354,6 +338,38 @@ describe('ngRepeat', function() {
354
338
} ) ;
355
339
356
340
341
+ it ( 'should allow expressions over multiple lines' , function ( ) {
342
+ element = $compile (
343
+ '<ul>' +
344
+ '<li ng-repeat="item in items\n' +
345
+ '| filter:isTrue">{{item.name}}/</li>' +
346
+ '</ul>' ) ( scope ) ;
347
+
348
+ scope . isTrue = function ( ) { return true ; } ;
349
+ scope . items = [ { name : 'igor' } , { name : 'misko' } ] ;
350
+
351
+ scope . $digest ( ) ;
352
+
353
+ expect ( element . text ( ) ) . toEqual ( 'igor/misko/' ) ;
354
+ } ) ;
355
+
356
+
357
+ it ( 'should strip white space characters correctly' , function ( ) {
358
+ element = $compile (
359
+ '<ul>' +
360
+ '<li ng-repeat="item \t\n \t in \n \t\n\n \nitems \t\t\n | filter:\n\n{' +
361
+ '\n\t name:\n\n \'ko\'\n\n}\n\n | orderBy: \t \n \'name\' \n\n' +
362
+ 'track \t\n by \n\n\t $index \t\n ">{{item.name}}/</li>' +
363
+ '</ul>' ) ( scope ) ;
364
+
365
+ scope . items = [ { name : 'igor' } , { name : 'misko' } ] ;
366
+
367
+ scope . $digest ( ) ;
368
+
369
+ expect ( element . text ( ) ) . toEqual ( 'misko/' ) ;
370
+ } ) ;
371
+
372
+
357
373
it ( 'should not ngRepeat over parent properties' , function ( ) {
358
374
var Class = function ( ) { } ;
359
375
Class . prototype . abc = function ( ) { } ;
0 commit comments