equal(jQuery("#qunit-fixture div").length,num,"Make sure all the removed divs were inserted.");
equal(jQuery("#qunit-fixture div").length,num,"Make sure all the removed divs were inserted.");
});
});
functiontestPrepend(val){
test("prepend(String)",function(){
expect(6);
expect(2);
vardefaultText,result,expected;
varresult,expected;
expected="Try them out:";
result=jQuery("#first").prepend("<b>buga</b>");
equal(result.text(),"buga"+expected,"Check if text prepending works");
equal(jQuery("#select3").prepend("<option value='prependTest'>Prepend Test</option>").find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
equal(result.text(),"buga"+defaultText,"Check if text prepending works");
expect(1);
equal(jQuery("#select3").prepend(val("<option value='prependTest'>Prepend Test</option>")).find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
varexpected;
expected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
expected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
equal(jQuery("#first").text(),"buga"+defaultText,"Check if text prepending works");
equal(jQuery("#first").text(),"buga"+defaultText,"Check if text prepending works");
equal(jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
equal(jQuery("<option value='prependTest'>Prepend Test</option>").prependTo("#select3").parent().find("option:first-child").attr("value"),"prependTest","Prepending html options to select element");
QUnit.reset();
});
test("prependTo(Element)",function(){
expect(1);
varexpected;
expected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";
expected="Try them out:This link has class=\"blog\": Simon Willison's Weblog";