diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-10-23 09:36:42 -0500 |
---|---|---|
committer | Corey Frang <gnarf@gnarf.net> | 2012-10-23 09:37:46 -0500 |
commit | e1230997aa14dae6f35326c8ba20bfe2428507c2 (patch) | |
tree | f00984f5fbbf12f175c0994c497513a2d8e8ee26 /tests/unit/autocomplete | |
parent | 7af1ec727bcca8367e804cea77b9dd238b1c0d69 (diff) | |
download | jquery-ui-e1230997aa14dae6f35326c8ba20bfe2428507c2.tar.gz jquery-ui-e1230997aa14dae6f35326c8ba20bfe2428507c2.zip |
Build: Enable "unused" option in jshint - Remove unused variables from codebase. - Closes gh-788
Squashed commit of the following:
commit 7f19f92c646f180bc067bb24123175251a64a9d6
Author: Mike Sherov <mike.sherov@gmail.com>
Date: Tue Oct 23 10:34:28 2012 -0400
put back in fake args for signatures that we want to keep
commit 257505a9e69da0c53e3a989dab87a13112045a29
Author: Mike Sherov <mike.sherov@gmail.com>
Date: Tue Oct 23 08:10:20 2012 -0400
changes per @scott_gonzalez
commit 12725480cb58e70865e5aa6e735009b6b035c8f3
Author: Mike Sherov <mike.sherov@gmail.com>
Date: Mon Oct 22 22:54:05 2012 -0400
clean up unused vars in ui directory
commit 563595e7aee5d4a5c096b2d1de655abdf920aacd
Author: Mike Sherov <mike.sherov@gmail.com>
Date: Mon Oct 22 22:37:42 2012 -0400
clean up unused vars in grunt and tests
Diffstat (limited to 'tests/unit/autocomplete')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_core.js | 3 | ||||
-rw-r--r-- | tests/unit/autocomplete/autocomplete_events.js | 6 | ||||
-rw-r--r-- | tests/unit/autocomplete/autocomplete_options.js | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js index f0ad36a57..f2062cacd 100644 --- a/tests/unit/autocomplete/autocomplete_core.js +++ b/tests/unit/autocomplete/autocomplete_core.js @@ -109,8 +109,7 @@ test( "allow form submit on enter when menu is not active", function() { function arrowsMoveFocus( id, isKeyUp ) { expect( 1 ); - var didMove = false, - element = $( id ).autocomplete({ + var element = $( id ).autocomplete({ source: [ "a" ], delay: 0, minLength: 0 diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js index 082263a35..fb1cf73a6 100644 --- a/tests/unit/autocomplete/autocomplete_events.js +++ b/tests/unit/autocomplete/autocomplete_events.js @@ -39,7 +39,7 @@ $.each([ ], "response ui.content" ); ui.content.splice( 0, 1 ); }, - open: function( event ) { + open: function() { ok( menu.is( ":visible" ), "menu open on open" ); }, focus: function( event, ui ) { @@ -127,7 +127,7 @@ asyncTest( "cancel focus", function() { element = $( "#autocomplete" ).autocomplete({ delay: 0, source: data, - focus: function( event, ui ) { + focus: function() { $( this ).val( customVal ); return false; } @@ -146,7 +146,7 @@ asyncTest( "cancel select", function() { element = $( "#autocomplete" ).autocomplete({ delay: 0, source: data, - select: function( event, ui ) { + select: function() { $( this ).val( customVal ); return false; } diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 1ab40f36c..8331c53d5 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -33,7 +33,7 @@ function autoFocusTest( afValue, focusedLength ) { autoFocus: afValue, delay: 0, source: data, - open: function( event, ui ) { + open: function() { equal( element.autocomplete( "widget" ).children( ".ui-menu-item:first" ).find( ".ui-state-focus" ).length, focusedLength, "first item is " + (afValue ? "" : "not") + " auto focused" ); start(); |