mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
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 gh-1926
This commit is contained in:
parent
b61b16b5a8
commit
42bcdb90f6
@ -146,12 +146,9 @@ QUnit.test( "animateClass works with colors", function( assert ) {
|
|||||||
|
|
||||||
QUnit.test( "animateClass calls step option", function( assert ) {
|
QUnit.test( "animateClass calls step option", function( assert ) {
|
||||||
assert.expect( 1 );
|
assert.expect( 1 );
|
||||||
var ready = assert.async();
|
|
||||||
var test = jQuery( "div.animateClass" ),
|
var test = jQuery( "div.animateClass" ),
|
||||||
step = function() {
|
step = function() {
|
||||||
assert.ok( true, "Step Function Called" );
|
assert.ok( true, "Step Function Called" );
|
||||||
test.stop();
|
|
||||||
ready();
|
|
||||||
step = $.noop;
|
step = $.noop;
|
||||||
};
|
};
|
||||||
test.toggleClass( "testChangeBackground", {
|
test.toggleClass( "testChangeBackground", {
|
||||||
@ -159,6 +156,8 @@ QUnit.test( "animateClass calls step option", function( assert ) {
|
|||||||
step();
|
step();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
test.stop( true, true );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "animateClass works with children", function( assert ) {
|
QUnit.test( "animateClass works with children", function( assert ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user