git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6458885
)
Basic unit tests; This patch relies on the 51 existing clone() tests
author
rwldrn
<waldron.rick@gmail.com>
Fri, 21 Jan 2011 16:08:15 +0000
(11:08 -0500)
committer
rwldrn
<waldron.rick@gmail.com>
Fri, 21 Jan 2011 16:08:15 +0000
(11:08 -0500)
test/unit/manipulation.js
patch
|
blob
|
history
diff --git
a/test/unit/manipulation.js
b/test/unit/manipulation.js
index
37234d8
..
a68c214
100644
(file)
--- 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' );
});
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' );
test("clone()", function() {
expect(37);
equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' );