diff options
author | Scott González <scott.gonzalez@gmail.com> | 2016-07-06 16:29:43 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-07-06 16:29:43 -0400 |
commit | ba91b324ab32ade74356adc48d2ee0e2c7b1e078 (patch) | |
tree | 170cdf5e2daaed9643dbf0ce59b789fdc6240d63 | |
parent | 9d807ba1095de773bc78fda077fcc2a0bfc25eac (diff) | |
download | jquery-ui-ba91b324ab32ade74356adc48d2ee0e2c7b1e078.tar.gz jquery-ui-ba91b324ab32ade74356adc48d2ee0e2c7b1e078.zip |
Effects: Fix timing of `.animateClass()` assertion
-rw-r--r-- | tests/unit/effects/core.js | 10 |
1 files 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)", |