aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/fx.js
diff options
context:
space:
mode:
authorDavid Serduke <davidserduke@gmail.com>2007-11-16 23:39:23 +0000
committerDavid Serduke <davidserduke@gmail.com>2007-11-16 23:39:23 +0000
commite2ef3df86d5f54274bf2b779d882c30aa0886bfe (patch)
tree7613d7efe66c2ba32366deb64c3d3a96edcf1951 /test/unit/fx.js
parentb9371a6ca4b756c4b4266a08336e80f715b66ad3 (diff)
downloadjquery-e2ef3df86d5f54274bf2b779d882c30aa0886bfe.tar.gz
jquery-e2ef3df86d5f54274bf2b779d882c30aa0886bfe.zip
Fixed #1095 bug where radio buttons became unchecked during show(). Also added unit test and had to fix a selector test that was broken by the new testing div in test/index.html. Last made some whitespace changes.
Diffstat (limited to 'test/unit/fx.js')
-rw-r--r--test/unit/fx.js68
1 files changed, 34 insertions, 34 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js
index d6de83f92..c20e39ceb 100644
--- a/test/unit/fx.js
+++ b/test/unit/fx.js
@@ -12,43 +12,43 @@ 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], "Animations finished in the correct order" );
- start();
- });
+ 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], "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();
+ 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() {