From 1073b75139054427a65df69367483cd43384f730 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 18 Apr 2017 16:45:30 -0700 Subject: [PATCH] qunit: Also clear $.timers when stopping unfinished animations Stopping the animation is essentially the same as pausing, it remains in the animation registry and will continue to fail all subsequent tests until one of those later tests starts the animation queue again and also happens to wait long enough for this unrelated animation to finish. Fix the testrunner to actually fully stop the pre-existing animations, which requires clearing $.timers as well. This matches the logic we have for pending ajax requests. Bug: T163211 Change-Id: Ic7d848187bc3c800e8347e0650093b2ffce6dddc --- tests/qunit/data/testrunner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js index 55bd27656d..a947484727 100644 --- a/tests/qunit/data/testrunner.js +++ b/tests/qunit/data/testrunner.js @@ -240,6 +240,7 @@ ); } ); // Force animations to stop to give the next test a clean start + $.timers = []; $.fx.stop(); throw new Error( 'Unfinished animations: ' + timers ); -- 2.20.1