diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-02-18 23:52:29 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-02-22 20:33:00 -0500 |
commit | 1f765366507102ea64b61052d8072205fa7f5ac3 (patch) | |
tree | 34f6d16af72ae89af8abec94a4822b99bc06350c /test/unit/effects.js | |
parent | dbf3056b250bbc279fa947031181f9e25a40bacf (diff) | |
download | jquery-1f765366507102ea64b61052d8072205fa7f5ac3.tar.gz jquery-1f765366507102ea64b61052d8072205fa7f5ac3.zip |
No ticket: Revise unit tests in anticipation of Sizzle-free builds
(cherry picked from commit 59f5adb622dd6bc3419bbaa9cc2d4acd7a0b08b9)
Diffstat (limited to 'test/unit/effects.js')
-rw-r--r-- | test/unit/effects.js | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js index e761300a2..9f09787b0 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -1,6 +1,18 @@ -if ( jQuery.fx ) { +(function() { -module("effects", { teardown: moduleTeardown }); +// Can't test what ain't there +if ( !jQuery.fx ) { + return; +} + +var off = jQuery.fx.off; + +module("effects", { + teardown: function() { + jQuery.fx.off = off; + return moduleTeardown.apply( this, arguments ); + } +}); test("sanity check", function() { expect(1); @@ -1084,12 +1096,11 @@ test("jQuery.show('fast') doesn't clear radio buttons (bug #1095)", function () stop(); var $checkedtest = jQuery("#checkedtest"); - // IE6 was clearing "checked" in jQuery(elem).show("fast"); $checkedtest.hide().show("fast", function() { - ok( !! jQuery(":radio:first", $checkedtest).attr("checked"), "Check first radio still checked." ); - ok( ! jQuery(":radio:last", $checkedtest).attr("checked"), "Check last radio still NOT checked." ); - ok( !! jQuery(":checkbox:first", $checkedtest).attr("checked"), "Check first checkbox still checked." ); - ok( ! jQuery(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." ); + ok( jQuery("input[type='radio']", $checkedtest).first().attr("checked"), "Check first radio still checked." ); + ok( !jQuery("input[type='radio']", $checkedtest).last().attr("checked"), "Check last radio still NOT checked." ); + ok( jQuery("input[type='checkbox']", $checkedtest).first().attr("checked"), "Check first checkbox still checked." ); + ok( !jQuery("input[type='checkbox']", $checkedtest).last().attr("checked"), "Check last checkbox still NOT checked." ); start(); }); }); @@ -1514,7 +1525,7 @@ test( "animate should set display for disconnected nodes", function() { }); }); -asyncTest("Animation callback should not show animated element as animated (#7157)", 1, function() { +asyncTest("Animation callback should not show animated element as :animated (#7157)", 1, function() { var foo = jQuery( "#foo" ); foo.animate({ @@ -2047,4 +2058,4 @@ test( ".finish() calls finish of custom queue functions", function() { div.remove(); }); -} // if ( jQuery.fx ) +})(); |