diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-04-18 22:36:15 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-04-18 22:36:15 -0400 |
commit | a28983086ee91b19200c47fadc6bc3ba58a0fcb9 (patch) | |
tree | 63cb0a513473836b603213f06a31611c6c453e82 /tests/unit/tooltip | |
parent | cb8474af1dc099de9e08665c9d6cdc2cf5864203 (diff) | |
download | jquery-ui-a28983086ee91b19200c47fadc6bc3ba58a0fcb9.tar.gz jquery-ui-a28983086ee91b19200c47fadc6bc3ba58a0fcb9.zip |
Tests: Lint.
Diffstat (limited to 'tests/unit/tooltip')
-rw-r--r-- | tests/unit/tooltip/tooltip_methods.js | 10 | ||||
-rw-r--r-- | tests/unit/tooltip/tooltip_options.js | 11 |
2 files changed, 12 insertions, 9 deletions
diff --git a/tests/unit/tooltip/tooltip_methods.js b/tests/unit/tooltip/tooltip_methods.js index 3e8256c50..eaab1c0d1 100644 --- a/tests/unit/tooltip/tooltip_methods.js +++ b/tests/unit/tooltip/tooltip_methods.js @@ -16,11 +16,12 @@ test( "destroy", function() { test( "open/close", function() { expect( 3 ); $.fx.off = true; - var element = $( "#tooltipped1" ).tooltip(); + var tooltip, + element = $( "#tooltipped1" ).tooltip(); equal( $( ".ui-tooltip" ).length, 0, "no tooltip on init" ); element.tooltip( "open" ); - var tooltip = $( "#" + element.attr( "aria-describedby" ) ); + tooltip = $( "#" + element.attr( "aria-describedby" ) ); ok( tooltip.is( ":visible" ) ); element.tooltip( "close" ); @@ -31,11 +32,12 @@ test( "open/close", function() { test( "enable/disable", function() { expect( 7 ); $.fx.off = true; - var element = $( "#tooltipped1" ).tooltip(); + var tooltip, + element = $( "#tooltipped1" ).tooltip(); equal( $( ".ui-tooltip" ).length, 0, "no tooltip on init" ); element.tooltip( "open" ); - var tooltip = $( "#" + element.attr( "aria-describedby" ) ); + tooltip = $( "#" + element.attr( "aria-describedby" ) ); ok( tooltip.is( ":visible" ) ); element.tooltip( "disable" ); diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index 42529e087..4f994f8de 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -45,11 +45,12 @@ asyncTest( "content: sync + async callback", function() { test( "items", function() { expect( 2 ); - var element = $( "#qunit-fixture" ).tooltip({ - items: "#fixture-span" - }); + var event, + element = $( "#qunit-fixture" ).tooltip({ + items: "#fixture-span" + }); - var event = $.Event( "mouseenter" ); + event = $.Event( "mouseenter" ); event.target = $( "#fixture-span" )[ 0 ]; element.tooltip( "open", event ); deepEqual( $( "#" + $( "#fixture-span" ).attr( "aria-describedby" ) ).text(), "title-text" ); @@ -63,7 +64,7 @@ test( "items", function() { }); test( "tooltipClass", function() { - expect( 1 ) + expect( 1 ); var element = $( "#tooltipped1" ).tooltip({ tooltipClass: "custom" }).tooltip( "open" ); |