aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-17 11:07:42 -0700
committerJohn Resig <jeresig@gmail.com>2011-04-17 11:07:42 -0700
commit21c0be8496127df3f0ad652e582133148430cc41 (patch)
tree1df5192669f32fe356bb6b1d61e3c4ae36544ac0 /test
parent728a70c036dfcdc0c45c5c60c08aeade786ce195 (diff)
downloadjquery-21c0be8496127df3f0ad652e582133148430cc41.tar.gz
jquery-21c0be8496127df3f0ad652e582133148430cc41.zip
Make sure that hide or show don't fail when operating on non-Element nodes. Fixes #6135.
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 8b7cf4679..ec1774544 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -88,6 +88,10 @@ test("show()", function() {
var elem = jQuery(selector, "#show-tests").show();
equals( elem.css("display"), expected, "Show using correct display type for " + selector );
});
+
+ // Make sure that showing or hiding a text node doesn't cause an error
+ jQuery("<div>test</div> text <span>test</span>").show().remove();
+ jQuery("<div>test</div> text <span>test</span>").hide().remove();
});
test("show(Number) - other displays", function() {