aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/fx.js
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2009-03-18 21:15:38 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2009-03-18 21:15:38 +0000
commit7c04a64016c1f295dfdf4e731f693f8400a987bc (patch)
tree643bb78b46c5556d66367d509d4468275b132327 /test/unit/fx.js
parent2c31a1624f72df3987cd1d0d3605c359658986e5 (diff)
downloadjquery-7c04a64016c1f295dfdf4e731f693f8400a987bc.tar.gz
jquery-7c04a64016c1f295dfdf4e731f693f8400a987bc.zip
breaking jquery out into smaller modules. added attributes.js, manipulation.js, and traversing.js
Diffstat (limited to 'test/unit/fx.js')
-rw-r--r--test/unit/fx.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/test/unit/fx.js b/test/unit/fx.js
index de10acedc..63a3de7a6 100644
--- a/test/unit/fx.js
+++ b/test/unit/fx.js
@@ -1,5 +1,40 @@
module("fx");
+test("show()", function() {
+ expect(15);
+ var pass = true, div = jQuery("#main div");
+ div.show().each(function(){
+ if ( this.style.display == "none" ) pass = false;
+ });
+ ok( pass, "Show" );
+
+ jQuery("#main").append('<div id="show-tests"><div><p><a href="#"></a></p><code></code><pre></pre><span></span></div><table><thead><tr><th></th></tr></thead><tbody><tr><td></td></tr></tbody></table><ul><li></li></ul></div>');
+
+ var old = jQuery("#show-tests table").show().css("display") !== "table";
+
+ var test = {
+ "div" : "block",
+ "p" : "block",
+ "a" : "inline",
+ "code" : "inline",
+ "pre" : "block",
+ "span" : "inline",
+ "table" : old ? "block" : "table",
+ "thead" : old ? "block" : "table-header-group",
+ "tbody" : old ? "block" : "table-row-group",
+ "tr" : old ? "block" : "table-row",
+ "th" : old ? "block" : "table-cell",
+ "td" : old ? "block" : "table-cell",
+ "ul" : "block",
+ "li" : old ? "block" : "list-item"
+ };
+
+ jQuery.each(test, function(selector, expected) {
+ var elem = jQuery(selector, "#show-tests").show();
+ equals( elem.css("display"), expected, "Show using correct display type for " + selector );
+ });
+});
+
test("animate(Hash, Object, Function)", function() {
expect(1);
stop();