X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Ffx.js;h=2ee3d30db99d3a9bbdb67bdb247d2e08cc781481;hb=4afa60835146e71c0e57b492a1cca278eaf1ef9c;hp=f8b63835e9a58cfe006148ce3cc5d892d00ca705;hpb=9e48649729a5d4cd9ce52bcba067ba33a562cb4b;p=jquery.git diff --git a/test/unit/fx.js b/test/unit/fx.js index f8b6383..2ee3d30 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -34,23 +34,6 @@ test("animate option (queue === false)", function () { }); }); -test("queue() defaults to 'fx' type", function () { - expect(2); - stop(); - - var $foo = jQuery("#foo"); - $foo.queue("fx", [ "sample", "array" ]); - var arr = $foo.queue(); - isSet(arr, [ "sample", "array" ], "queue() got an array set with type 'fx'"); - $foo.queue([ "another", "one" ]); - var arr = $foo.queue("fx"); - isSet(arr, [ "another", "one" ], "queue('fx') got an array set with no type"); - // clean up after test - $foo.queue([]); - - start(); -}); - test("stop()", function() { expect(3); stop(); @@ -155,13 +138,20 @@ test("stop(clearQueue, gotoEnd)", function() { }); test("toggle()", function() { - expect(3); + expect(6); var x = jQuery("#foo"); ok( x.is(":visible"), "is visible" ); x.toggle(); ok( x.is(":hidden"), "is hidden" ); x.toggle(); ok( x.is(":visible"), "is visible again" ); + + x.toggle(true); + ok( x.is(":visible"), "is visible" ); + x.toggle(false); + ok( x.is(":hidden"), "is hidden" ); + x.toggle(true); + ok( x.is(":visible"), "is visible again" ); }); var visible = {