This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
$window mocking not working with ngAnimate since 1.4.0 #11964
Closed
Description
I have tests for a directive that uses $window
and ngAnimate
. Since 1.4.0 (or 1.4.0-rc.0) I cannot mock $window
without having document
property set in $window
.
This issue is due to var bodyElement = jqLite($document[0].body);
in ngAnimate
animateQueue.js
https://github.com/angular/angular.js/blob/master/src/ngAnimate/animateQueue.js#L108.
I have a JSFiddle demonstrating this problem: