Skip to content

Commit f612a41

Browse files
committed
Effects tests: Convert step callback to a no-op after first call in animateClass test.
1 parent ab39099 commit f612a41

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/unit/effects/effects_core.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ asyncTest( "animateClass works with colors", function() {
9090
});
9191

9292
asyncTest( "animateClass calls step option", 1, function() {
93-
var test = jQuery("div.animateClass"),
94-
done = function() {
95-
done = jQuery.noop;
93+
var test = jQuery( "div.animateClass" ),
94+
step = function( fx ) {
95+
ok( true, "Step Function Called" );
9696
test.stop();
9797
start();
98+
step = $.noop;
9899
};
99100
test.toggleClass( "testChangeBackground", {
100-
step: function( fx ) {
101-
ok( true, "Step Function Called" );
102-
setTimeout( done, 0 );
101+
step: function() {
102+
step();
103103
}
104104
});
105105
});

0 commit comments

Comments
 (0)