diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2015-10-09 15:52:29 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-10-18 12:30:00 -0400 |
commit | 67d7a2eefee768b59eb3d51cb1fb2c671873e58a (patch) | |
tree | 50f099cedd0c00039f80209e8aaa1e13ccc5ae14 /test/unit/basic.js | |
parent | e271f665dd8fb617a5015051e1c9df8cebd6c97b (diff) | |
download | jquery-67d7a2eefee768b59eb3d51cb1fb2c671873e58a.tar.gz jquery-67d7a2eefee768b59eb3d51cb1fb2c671873e58a.zip |
CSS: Make show/hide/toggle methods a module
Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.
Fixes gh-2193
Close gh-2648
Diffstat (limited to 'test/unit/basic.js')
-rw-r--r-- | test/unit/basic.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/basic.js b/test/unit/basic.js index 25e86d1a3..49b518d3f 100644 --- a/test/unit/basic.js +++ b/test/unit/basic.js @@ -54,11 +54,19 @@ QUnit.test( "attributes", function( assert ) { if ( jQuery.css ) { QUnit.test( "css", function( assert ) { - assert.expect( 3 ); + assert.expect( 1 ); var div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" ); assert.strictEqual( div.css( "width", "50px" ).css( "width" ), "50px", ".css getter/setter" ); +} ); +} + +if ( jQuery.fn.show && jQuery.fn.hide ) { +QUnit.test( "show/hide", function( assert ) { + assert.expect( 2 ); + + var div = jQuery( "<div/>" ).appendTo( "#qunit-fixture" ); div.hide(); assert.strictEqual( div.css( "display" ), "none", "div hidden" ); |