diff options
author | David Serduke <davidserduke@gmail.com> | 2007-11-16 18:23:59 +0000 |
---|---|---|
committer | David Serduke <davidserduke@gmail.com> | 2007-11-16 18:23:59 +0000 |
commit | 0a0990485e5c1fd4b4fdcce7f7723d9e0a9dd16d (patch) | |
tree | 9882fa55805a16e9e9dbb6699aa5a999aad39aa8 /test/unit/fx.js | |
parent | 1d299d375b6d97d65559286d914df2d5a77949db (diff) | |
download | jquery-0a0990485e5c1fd4b4fdcce7f7723d9e0a9dd16d.tar.gz jquery-0a0990485e5c1fd4b4fdcce7f7723d9e0a9dd16d.zip |
Fixed #1822 bug where queue() didn't always default to type 'fx'.
Diffstat (limited to 'test/unit/fx.js')
-rw-r--r-- | test/unit/fx.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js index 6c5bb55cb..d6de83f92 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -29,11 +29,28 @@ test("animate option (queue === false)", function () { $foo.animate({height:'100px'}, 10, function() { // queued behind the first animation so should finish third order.push(3); - isSet( order, [ 1, 2, 3] ); + isSet( order, [ 1, 2, 3], "Animations finished in the correct order" ); start(); }); }); +test("queue() defaults to 'fx' type", function () { + expect(2); + stop(); + + var $foo = $("#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(); |