]> source.dussan.org Git - jquery-ui.git/commitdiff
Effects tests: Convert step callback to a no-op after first call in animateClass...
authorScott González <scott.gonzalez@gmail.com>
Mon, 25 Jun 2012 17:05:01 +0000 (13:05 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 25 Jun 2012 17:05:01 +0000 (13:05 -0400)
tests/unit/effects/effects_core.js

index 60706b87b0dfceaf8a0d5bcc41e333359c9e0c3e..04bfc12da2e959aaf68ea26c2e91688b1545264b 100644 (file)
@@ -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();
                }
        });
 });