From ba91b324ab32ade74356adc48d2ee0e2c7b1e078 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 6 Jul 2016 16:29:43 -0400 Subject: [PATCH] Effects: Fix timing of `.animateClass()` assertion --- tests/unit/effects/core.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js index 5fba4e69e..0812e1184 100644 --- a/tests/unit/effects/core.js +++ b/tests/unit/effects/core.js @@ -206,9 +206,13 @@ QUnit.test( "animateClass clears style properties when stopped", function( asser test.addClass( "testChangeBackground", duration ); assert.notEqual( orig, style.cssText, "cssText is not the same after starting animation" ); - test.stop( true, true ); - assert.equal( orig, $.trim( style.cssText ), "cssText is the same after stopping animation midway" ); - ready(); + test + .stop( true, true ) + .promise() + .then( function() { + assert.equal( orig, $.trim( style.cssText ), "cssText is the same after stopping animation midway" ); + ready(); + } ); } ); QUnit.test( "animateClass: css and class changes during animation are not lost (#7106)", -- 2.39.5