Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit c9245cf

Browse files
committedFeb 26, 2014
test($animate): ensure staggering timeout tests are secure
1 parent 99720fb commit c9245cf

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎test/ngAnimate/animateSpec.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,15 @@ describe("ngAnimate", function() {
12591259
}
12601260

12611261
//(stagger * index) + (duration + delay) * 150%
1262-
$timeout.flush(9500); //0.5 * 4 + 5 * 1.5 = 9500;
1262+
//0.5 * 4 + 5 * 1.5 = 9500;
1263+
//9500 - 7500 = 2000
1264+
$timeout.flush(1999); //remove 1999 more
1265+
1266+
for(var i = 0; i < 5; i++) {
1267+
expect(kids[i].hasClass('ng-enter-active')).toBe(true);
1268+
}
1269+
1270+
$timeout.flush(1); //up to 2000ms
12631271

12641272
for(var i = 0; i < 5; i++) {
12651273
expect(kids[i].hasClass('ng-enter-active')).toBe(false);

0 commit comments

Comments
 (0)
This repository has been archived.