equals( val, old[i], "Make sure the incoming value is correct." );
return "<b>bold</b>";
});
+
+ // Handle the case where no comment is in the document
+ if ( j.length === 2 ) {
+ equals( null, null, "Make sure the incoming value is correct." );
+ }
j.find('b').removeData();
equals( j.html().replace(/ xmlns="[^"]+"/g, "").toLowerCase(), "<b>bold</b>", "Check node,textnode,comment with html()" );
equals( jQuery("#ap").children().length, 0, "Check multi-filtered remove" );
// using contents will get comments regular, text, and comment nodes
- equals( jQuery("#nonnodes").contents().length, 3, "Check node,textnode,comment remove works" );
+ // Handle the case where no comment is in the document
+ ok( jQuery("#nonnodes").contents().length >= 2, "Check node,textnode,comment remove works" );
jQuery("#nonnodes").contents()[method]();
equals( jQuery("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" );