diff options
Diffstat (limited to 'test/widgetsSpec.js')
| -rw-r--r-- | test/widgetsSpec.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js index d3b2ec5d..aadc1597 100644 --- a/test/widgetsSpec.js +++ b/test/widgetsSpec.js @@ -893,7 +893,11 @@ describe("widget", function(){ it('should expose iterator position as $position when iterating over arrays', function() { var scope = compile('<ul><li ng:repeat="item in items" ' + 'ng:bind="item + \':\' + $position + \'|\'"></li></ul>'); - scope.items = ['misko', 'shyam', 'doug', 'frodo']; + scope.items = ['misko', 'shyam', 'doug']; + scope.$eval(); + expect(element.text()).toEqual('misko:first|shyam:middle|doug:last|'); + + scope.items.push('frodo'); scope.$eval(); expect(element.text()).toEqual('misko:first|shyam:middle|doug:middle|frodo:last|'); }); |
