Skip to content
Permalink
Browse files

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

  • Loading branch information...
rwaldron committed Jan 21, 2011
1 parent 6458885 commit 33a67ffa9d85450f1edf1b1645b57f7641e2e2d2
Showing with 12 additions and 0 deletions.
  1. +12 −0 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.children.length, clone.children.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' );

0 comments on commit 33a67ff

Please sign in to comment.
You can’t perform that action at this time.