From 3d8a42cdebd714a11fe99f92bc8cc2667a1b6ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Wed, 10 Jun 2020 18:37:29 +0200 Subject: [PATCH] Tests: Clear the timers queue in an animateClass test jQueries older than 1.11 or 2.1 were leaving a timer in the queue which could then influence other tests. --- tests/unit/effects/core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js index 7ae56aef5a2..b8da50d5dcd 100644 --- a/tests/unit/effects/core.js +++ b/tests/unit/effects/core.js @@ -146,12 +146,9 @@ QUnit.test( "animateClass works with colors", function( assert ) { QUnit.test( "animateClass calls step option", function( assert ) { assert.expect( 1 ); - var ready = assert.async(); var test = jQuery( "div.animateClass" ), step = function() { assert.ok( true, "Step Function Called" ); - test.stop(); - ready(); step = $.noop; }; test.toggleClass( "testChangeBackground", { @@ -159,6 +156,8 @@ QUnit.test( "animateClass calls step option", function( assert ) { step(); } } ); + + test.stop( true, true ); } ); QUnit.test( "animateClass works with children", function( assert ) {