diff options
| author | Matias Niemelä | 2014-02-26 16:07:36 -0500 |
|---|---|---|
| committer | Matias Niemelä | 2014-02-26 17:17:41 -0500 |
| commit | f4f1f43d5140385bbf070510975f72b65196e08a (patch) | |
| tree | a9f52b993472d070616a245fcd729610291d3c29 /test/ngAnimate/animateSpec.js | |
| parent | 73daa79e911260fc177727238c3e780e8043244e (diff) | |
| download | angular.js-f4f1f43d5140385bbf070510975f72b65196e08a.tar.bz2 | |
fix($animate): ensure all comment nodes are removed during a leave animation
Closes #6403
Diffstat (limited to 'test/ngAnimate/animateSpec.js')
| -rw-r--r-- | test/ngAnimate/animateSpec.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ngAnimate/animateSpec.js b/test/ngAnimate/animateSpec.js index eaed757e..6dd3b117 100644 --- a/test/ngAnimate/animateSpec.js +++ b/test/ngAnimate/animateSpec.js @@ -3418,6 +3418,27 @@ describe("ngAnimate", function() { }); }); + it('should remove all element and comment nodes during leave animation', + inject(function($compile, $rootScope) { + + $rootScope.items = [1,2,3,4,5]; + + var element = html($compile( + '<div>' + + ' <div class="animated" ng-repeat-start="item in items">start</div>' + + ' <div ng-repeat-end>end</div>' + + '</div>' + )($rootScope)); + + $rootScope.$digest(); + + $rootScope.items = []; + + $rootScope.$digest(); + + expect(element.children().length).toBe(0); + })); + it('should not throw an error when only comment nodes are rendered in the animation', inject(function($rootScope, $compile) { |
