X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=739868bd7bf5d9d4b53e8f8cce78bb713d95dbd1;hp=37234d86d3e2443496239573080d92d1ac1e3668;hb=f1bd0cfc4d3eabf566b6a3345d888e6db67bc00b;hpb=e78d3a7e2d47e9796f87c18b76f8178b0bee42c5 diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 37234d8..739868b 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -871,6 +871,18 @@ test("replaceAll(String|Element|Array<Element>|jQuery)", function() { ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' ); }); +test("jQuery.clone() (#8017)", function() { + + expect(2); + + ok( jQuery.clone && jQuery.isFunction( jQuery.clone ) , "jQuery.clone() utility exists and is a function."); + + var main = jQuery("#main")[0], + clone = jQuery.clone( main ); + + equals( main.childNodes.length, clone.childNodes.length, "Simple child length to ensure a large dom tree copies correctly" ); +}); + test("clone()", function() { expect(37); equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' );