aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngAnimate/animateSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/ngAnimate/animateSpec.js')
-rw-r--r--test/ngAnimate/animateSpec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js
index a30b5fe9..9179eb2b 100644
--- a/test/ngAnimate/animateSpec.js
+++ b/test/ngAnimate/animateSpec.js
@@ -3370,5 +3370,21 @@ describe("ngAnimate", function() {
expect(stat).toBe('gone');
});
});
+
+ it('should not throw an error when only comment nodes are rendered in the animation',
+ inject(function($rootScope, $compile) {
+
+ $rootScope.items = [1,2,3,4,5];
+
+ var element = html($compile('<div><div class="animated" ng-if="valid" ng-repeat="item in items"></div></div>')($rootScope));
+
+ $rootScope.$digest();
+
+ $rootScope.items = [];
+
+ $rootScope.$digest();
+
+ expect(element.children().length).toBe(0);
+ }));
});
});