Merge branch '8017lint' of https://github.com/rwldrn/jquery into 8017lint
[jquery.git] / test / unit / manipulation.js
index 37234d8..739868b 100644 (file)
@@ -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' );