Permalink
Browse files

Effects tests: Convert step callback to a no-op after first call in a…

…nimateClass test.
  • Loading branch information...
1 parent ab39099 commit f612a41b18aa9aced54cfe7a42dd4aa7728027e1 @scottgonzalez scottgonzalez committed Jun 25, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 tests/unit/effects/effects_core.js
View
12 tests/unit/effects/effects_core.js
@@ -90,16 +90,16 @@ asyncTest( "animateClass works with colors", function() {
});
asyncTest( "animateClass calls step option", 1, function() {
- var test = jQuery("div.animateClass"),
- done = function() {
- done = jQuery.noop;
+ var test = jQuery( "div.animateClass" ),
+ step = function( fx ) {
+ ok( true, "Step Function Called" );
test.stop();
start();
+ step = $.noop;
};
test.toggleClass( "testChangeBackground", {
- step: function( fx ) {
- ok( true, "Step Function Called" );
- setTimeout( done, 0 );
+ step: function() {
+ step();
}
});
});

0 comments on commit f612a41

Please sign in to comment.