+
+ // Try to wrap an element with multiple elements (should fail)
+ j = jQuery("<div><span></span></div>").children().wrap("<p></p><div></div>");
+ equals( j[0].parentNode.parentNode.childNodes.length, 1, "There should only be one element wrapping." );
+ equals( j.length, 1, "There should only be one element (no cloning)." );
+ equals( j[0].parentNode.nodeName.toUpperCase(), "P", "The span should be in the paragraph." );