X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=80a93353c96bffd2eb712b3a14d1b15fb639fde3;hb=944484c3fe001bcfea52fd85612042d7475597a1;hp=8483361a1735937c011afd7e0e1a9f2c360b00c2;hpb=0c97178553606c01b999441836e23f9f36c645a3;p=jquery.git
diff --git a/test/unit/core.js b/test/unit/core.js
index 8483361..80a9335 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -751,7 +751,7 @@ test("text()", function() {
});
test("wrap(String|Element)", function() {
- expect(8);
+ expect(10);
var defaultText = 'Try them out:'
var result = jQuery('#first').wrap('
').text();
equals( defaultText, result, 'Check for wrapping of on-the-fly html' );
@@ -776,6 +776,11 @@ test("wrap(String|Element)", function() {
j.wrap("");
equals( jQuery("#nonnodes > i").length, 3, "Check node,textnode,comment wraps ok" );
equals( jQuery("#nonnodes > i").text(), j.text() + j[1].nodeValue, "Check node,textnode,comment wraps doesn't hurt text" );
+
+ // Try wrapping a disconnected node
+ j = jQuery("").wrap("");
+ equals( j[0].nodeName, "LABEL", "Element is a label" );
+ equals( j[0].parentNode.nodeName, "LI", "Element has been wrapped" );
});
test("wrapAll(String|Element)", function() {