aboutsummaryrefslogtreecommitdiffstats
path: root/test/directive/ngRepeatSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/directive/ngRepeatSpec.js')
-rw-r--r--test/directive/ngRepeatSpec.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/directive/ngRepeatSpec.js b/test/directive/ngRepeatSpec.js
index 8b6a5173..85aa1511 100644
--- a/test/directive/ngRepeatSpec.js
+++ b/test/directive/ngRepeatSpec.js
@@ -64,12 +64,19 @@ describe('ng-repeat', function() {
}));
- it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile, $log) {
+ it('should error on wrong parsing of ng-repeat', inject(function($rootScope, $compile) {
expect(function() {
element = $compile('<ul><li ng-repeat="i dont parse"></li></ul>')($rootScope);
}).toThrow("Expected ng-repeat in form of '_item_ in _collection_' but got 'i dont parse'.");
+ }));
+
- $log.error.logs.shift();
+ it("should throw error when left-hand-side of ng-repeat can't be parsed", inject(
+ function($rootScope, $compile) {
+ expect(function() {
+ element = $compile('<ul><li ng-repeat="i dont parse in foo"></li></ul>')($rootScope);
+ }).toThrow("'item' in 'item in collection' should be identifier or (key, value) but got " +
+ "'i dont parse'.");
}));