From: Timo Tijhof Date: Tue, 18 Apr 2017 23:45:30 +0000 (-0700) Subject: qunit: Also clear $.timers when stopping unfinished animations X-Git-Tag: 1.31.0-rc.0~3472^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=1073b75139054427a65df69367483cd43384f730;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );