aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2016-07-06 16:29:43 -0400
committerScott González <scott.gonzalez@gmail.com>2016-07-06 16:29:43 -0400
commitba91b324ab32ade74356adc48d2ee0e2c7b1e078 (patch)
tree170cdf5e2daaed9643dbf0ce59b789fdc6240d63
parent9d807ba1095de773bc78fda077fcc2a0bfc25eac (diff)
downloadjquery-ui-ba91b324ab32ade74356adc48d2ee0e2c7b1e078.tar.gz
jquery-ui-ba91b324ab32ade74356adc48d2ee0e2c7b1e078.zip
Effects: Fix timing of `.animateClass()` assertion
-rw-r--r--tests/unit/effects/core.js10
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)",