X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=ba57a6f91a0bc31500dbedb2d4c48773e4dd44c4;hb=445fdf720ce26b99aadace85b7ec976f90583c3a;hp=48050168435aa1cc842024a6ac04b5a4cd60cc94;hpb=ab2a70e6cfba19ec9140c3e393e8cdb60c537bdb;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 4805016..ba57a6f 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -37,21 +37,21 @@ test("text(Function)", function() { test("text(Function) with incoming value", function() { expect(2); - + var old = "This link has class=\"blog\": Simon Willison's Weblog"; - + jQuery('#sap').text(function(i, val) { equals( val, old, "Make sure the incoming value is correct." ); return "foobar"; }); - + equals( jQuery("#sap").text(), "foobar", 'Check for merged text of more then one element.' ); - + QUnit.reset(); }); var testWrap = function(val) { - expect(18); + expect(19); var defaultText = 'Try them out:' var result = jQuery('#first').wrap(val( '
' )).text(); equals( defaultText, result, 'Check for wrapping of on-the-fly html' ); @@ -80,10 +80,20 @@ var testWrap = function(val) { equals( jQuery("#nonnodes > i").text(), j.text(), "Check node,textnode,comment wraps doesn't hurt text" ); // Try wrapping a disconnected node + var cacheLength = 0; + for (var i in jQuery.cache) { + cacheLength++; + } + j = jQuery("