Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Basic unit tests; This patch relies on the 51 existing clone() tests

  • Loading branch information...
commit 33a67ffa9d85450f1edf1b1645b57f7641e2e2d2 1 parent 6458885
Rick Waldron rwaldron authored

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. +12 0 test/unit/manipulation.js
12 test/unit/manipulation.js
@@ -871,6 +871,18 @@ test("replaceAll(String|Element|Array<Element>|jQuery)", function() {
871 871 ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after set of elements' );
872 872 });
873 873
  874 +test("jQuery.clone() (#8017)", function() {
  875 +
  876 + expect(2);
  877 +
  878 + ok( jQuery.clone && jQuery.isFunction( jQuery.clone ) , "jQuery.clone() utility exists and is a function.");
  879 +
  880 + var main = jQuery("#main")[0],
  881 + clone = jQuery.clone( main );
  882 +
  883 + equals( main.children.length, clone.children.length, "Simple child length to ensure a large dom tree copies correctly" );
  884 +});
  885 +
874 886 test("clone()", function() {
875 887 expect(37);
876 888 equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' );

0 comments on commit 33a67ff

Please sign in to comment.
Something went wrong with that request. Please try again.