X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=6de3e14eb2db2ef407f33450985b63d5c27b5ceb;hb=4b70f006f579fba24a882d80ca67f1971dbb4922;hp=4631ead61eac05a8142aec381f4b0e51a79da61d;hpb=f6a0bf6816f4e2e67382b1b13fdd3ff2ea4b22f8;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 4631ead..6de3e14 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -549,7 +549,7 @@ test("replaceAll(String|Element|Array<Element>|jQuery)", function() { }); test("clone()", function() { - expect(28); + expect(30); equals( 'This is a normal link: Yahoo', jQuery('#en').text(), 'Assert text for #en' ); var clone = jQuery('#yahoo').clone(); equals( 'Try them out:Yahoo', jQuery('#first').append(clone).text(), 'Check for clone' ); @@ -594,6 +594,11 @@ test("clone()", function() { div = div.clone(true); equals( div.length, 1, "One element cloned" ); equals( div[0].nodeName.toUpperCase(), "DIV", "DIV element cloned" ); + + div = jQuery("
").data({ a: true, b: true }); + div = div.clone(true); + equals( div.data("a"), true, "Data cloned." ); + equals( div.data("b"), true, "Data cloned." ); }); if (!isLocal) {