diff options
author | Dave Methvin <dave.methvin@gmail.com> | 2015-10-14 15:07:53 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2015-10-18 12:39:38 -0400 |
commit | 4bf1a09522955eb52de1fafb4ee1ecc5982b7a3e (patch) | |
tree | 2fcab93f0dfa9e9c5be41517e397efff62bfe647 /test/unit/attributes.js | |
parent | 53f798cf4d783bb813b4d1ba97411bc752b275f3 (diff) | |
download | jquery-4bf1a09522955eb52de1fafb4ee1ecc5982b7a3e.tar.gz jquery-4bf1a09522955eb52de1fafb4ee1ecc5982b7a3e.zip |
Attributes: Use simpler boolean check vs a function call
Ref gh-2491
Diffstat (limited to 'test/unit/attributes.js')
-rw-r--r-- | test/unit/attributes.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 30131b08c..6e9f44c9f 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -1221,7 +1221,7 @@ QUnit.test( "removeClass(undefined) is a no-op", function( assert ) { } ); var testToggleClass = function( valueObj, assert ) { - assert.expect( 9 ); + assert.expect( 11 ); var e = jQuery( "#firstp" ); assert.ok( !e.is( ".test" ), "Assert class not present" ); @@ -1233,8 +1233,12 @@ var testToggleClass = function( valueObj, assert ) { // class name with a boolean e.toggleClass( valueObj( "test" ), false ); assert.ok( !e.is( ".test" ), "Assert class not present" ); + e.toggleClass( valueObj( "test" ), false ); + assert.ok( !e.is( ".test" ), "Assert class still not present" ); e.toggleClass( valueObj( "test" ), true ); assert.ok( e.is( ".test" ), "Assert class present" ); + e.toggleClass( valueObj( "test" ), true ); + assert.ok( e.is( ".test" ), "Assert class still present" ); e.toggleClass( valueObj( "test" ), false ); assert.ok( !e.is( ".test" ), "Assert class not present" ); |