From 42bcdb90f62399f74c9ad7abd08dcd8067525668 Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Thu, 23 Jul 2020 15:49:27 +0200 Subject: 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. Closes gh-1926 --- tests/unit/effects/core.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js index 7ae56aef5..b8da50d5d 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 ) { -- cgit v1.2.3