Skip to content

Commit ba91b32

Browse files
committed
Effects: Fix timing of .animateClass() assertion
1 parent 9d807ba commit ba91b32

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/unit/effects/core.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,13 @@ QUnit.test( "animateClass clears style properties when stopped", function( asser
206206
test.addClass( "testChangeBackground", duration );
207207
assert.notEqual( orig, style.cssText, "cssText is not the same after starting animation" );
208208

209-
test.stop( true, true );
210-
assert.equal( orig, $.trim( style.cssText ), "cssText is the same after stopping animation midway" );
211-
ready();
209+
test
210+
.stop( true, true )
211+
.promise()
212+
.then( function() {
213+
assert.equal( orig, $.trim( style.cssText ), "cssText is the same after stopping animation midway" );
214+
ready();
215+
} );
212216
} );
213217

214218
QUnit.test( "animateClass: css and class changes during animation are not lost (#7106)",

0 commit comments

Comments
 (0)