X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Ffx.js;h=6c5bb55cbebc6e2ff90c49a3435f4f23593e914a;hb=1d299d375b6d97d65559286d914df2d5a77949db;hp=1f9e674a163ea274a874d6d07539f549481809e5;hpb=ab96367f121a5cdbe491fafb35cb041055a28a52;p=jquery.git diff --git a/test/unit/fx.js b/test/unit/fx.js index 1f9e674..6c5bb55 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -11,6 +11,29 @@ test("animate(Hash, Object, Function)", function() { }); }); +test("animate option (queue === false)", function () { + expect(1); + stop(); + + var order = []; + + var $foo = $("#foo"); + $foo.animate({width:'100px'}, 200, function () { + // should finish after unqueued animation so second + order.push(2); + }); + $foo.animate({fontSize:'2em'}, {queue:false, duration:10, complete:function () { + // short duration and out of queue so should finish first + order.push(1); + }}); + $foo.animate({height:'100px'}, 10, function() { + // queued behind the first animation so should finish third + order.push(3); + isSet( order, [ 1, 2, 3] ); + start(); + }); +}); + test("stop()", function() { expect(3); stop();