Skip to content

Commit 42bcdb9

Browse files
authored
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 jquerygh-1926
1 parent b61b16b commit 42bcdb9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/unit/effects/core.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,18 @@ QUnit.test( "animateClass works with colors", function( assert ) {
146146

147147
QUnit.test( "animateClass calls step option", function( assert ) {
148148
assert.expect( 1 );
149-
var ready = assert.async();
150149
var test = jQuery( "div.animateClass" ),
151150
step = function() {
152151
assert.ok( true, "Step Function Called" );
153-
test.stop();
154-
ready();
155152
step = $.noop;
156153
};
157154
test.toggleClass( "testChangeBackground", {
158155
step: function() {
159156
step();
160157
}
161158
} );
159+
160+
test.stop( true, true );
162161
} );
163162

164163
QUnit.test( "animateClass works with children", function( assert ) {

0 commit comments

Comments
 (0)