X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Ffx.js;h=481b172225121ffd5dc0bc4da8b4de0319f640ce;hb=ffbedf0262b3eea906f39c0115b818d7456a3994;hp=1204e261cfe432d60839d4e5d8acbaf602384f7f;hpb=12ef255ffdb3c2d045ee37beb9419f14d9c30217;p=jquery.git diff --git a/test/unit/fx.js b/test/unit/fx.js index 1204e26..481b172 100644 --- a/test/unit/fx.js +++ b/test/unit/fx.js @@ -1,12 +1,17 @@ module("fx"); test("animate(Hash, Object, Function)", function() { - expect(1); + expect(3); stop(); var hash = {opacity: 'show'}; var hashCopy = $.extend({}, hash); $('#foo').animate(hash, 0, function() { ok( hash.opacity == hashCopy.opacity, 'Check if animate changed the hash parameter' ); + }); + // using contents will get comments regular, text, and comment nodes + $("#nonnodes").contents().animate({paddingLeft:"5px"}, 100, function () { + equals(this.nodeType, 1, "Check node,textnode,comment animate just does real nodes" ); + equals($(this).css("paddingLeft"), "5px", "Check node,textnode,comment animate just does real nodes" ); start(); }); });