$parentDiv = jQuery( "<div/>" );
$parentDiv.append( $childDiv );
$parentDiv.text("Dry off");
-
+
equal( $childDiv.data("leak"), undefined, "Check for leaks (#11809)" );
}
}
function testHtml( valueObj ) {
- expect( 37 );
+ expect( 40 );
var actual, expected, tmp,
div = jQuery("<div></div>"),
equal( div.html(valueObj(5)).html(), "5", "Setting a number as html" );
equal( div.html(valueObj(0)).html(), "0", "Setting a zero as html" );
+ equal( div.html(valueObj(Infinity)).html(), "Infinity", "Setting Infinity as html" );
+ equal( div.html(valueObj(NaN)).html(), "", "Setting NaN as html" );
+ equal( div.html(valueObj(1e2)).html(), "100", "Setting exponential number notation as html" );
div.html( valueObj(" &") );
equal(
ok( /^[^<]*[^<\s][^<]*$/.test( fixture.html() ), "Replace html with text" );
}
-test( "html(String)", function() {
+test( "html(String|Number)", function() {
testHtml( manipulationBareObj );
});