From e1230997aa14dae6f35326c8ba20bfe2428507c2 Mon Sep 17 00:00:00 2001 From: Mike Sherov Date: Tue, 23 Oct 2012 09:36:42 -0500 Subject: Build: Enable "unused" option in jshint - Remove unused variables from codebase. - Closes gh-788 Squashed commit of the following: commit 7f19f92c646f180bc067bb24123175251a64a9d6 Author: Mike Sherov 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 Date: Tue Oct 23 08:10:20 2012 -0400 changes per @scott_gonzalez commit 12725480cb58e70865e5aa6e735009b6b035c8f3 Author: Mike Sherov Date: Mon Oct 22 22:54:05 2012 -0400 clean up unused vars in ui directory commit 563595e7aee5d4a5c096b2d1de655abdf920aacd Author: Mike Sherov Date: Mon Oct 22 22:37:42 2012 -0400 clean up unused vars in grunt and tests --- tests/unit/draggable/draggable_options.js | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'tests/unit/draggable/draggable_options.js') diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js index ea4611d69..4f7781515 100644 --- a/tests/unit/draggable/draggable_options.js +++ b/tests/unit/draggable/draggable_options.js @@ -210,7 +210,7 @@ test("{ cursor: 'auto' }, default", function() { el = $("#draggable2").draggable({ cursor: expected, - start: function(event, ui) { + start: function() { actual = getCursor(); } }); @@ -234,7 +234,7 @@ test("{ cursor: 'move' }", function() { el = $("#draggable2").draggable({ cursor: expected, - start: function(event, ui) { + start: function() { actual = getCursor(); } }); @@ -449,7 +449,7 @@ test("{ helper: 'original' }, relative, with scroll offset on parent", function( setScroll(); testScroll('absolute'); - restoreScroll(); + TestHelpers.restoreScroll(); }); @@ -466,7 +466,7 @@ test("{ helper: 'original' }, relative, with scroll offset on root", function() setScroll('root'); testScroll('absolute'); - restoreScroll('root'); + TestHelpers.restoreScroll('root'); }); @@ -486,8 +486,8 @@ test("{ helper: 'original' }, relative, with scroll offset on root and parent", setScroll('root'); testScroll('absolute'); - restoreScroll(); - restoreScroll('root'); + TestHelpers.restoreScroll(); + TestHelpers.restoreScroll('root'); }); @@ -504,7 +504,7 @@ test("{ helper: 'original' }, absolute, with scroll offset on parent", function( setScroll(); testScroll('absolute'); - restoreScroll(); + TestHelpers.restoreScroll(); }); @@ -521,7 +521,7 @@ test("{ helper: 'original' }, absolute, with scroll offset on root", function() setScroll('root'); testScroll('absolute'); - restoreScroll('root'); + TestHelpers.restoreScroll('root'); }); @@ -541,8 +541,8 @@ test("{ helper: 'original' }, absolute, with scroll offset on root and parent", setScroll('root'); testScroll('absolute'); - restoreScroll(); - restoreScroll('root'); + TestHelpers.restoreScroll(); + TestHelpers.restoreScroll('root'); }); @@ -559,7 +559,7 @@ test("{ helper: 'original' }, fixed, with scroll offset on parent", function() { setScroll(); testScroll('absolute'); - restoreScroll(); + TestHelpers.restoreScroll(); }); @@ -576,7 +576,7 @@ test("{ helper: 'original' }, fixed, with scroll offset on root", function() { setScroll('root'); testScroll('absolute'); - restoreScroll('root'); + TestHelpers.restoreScroll('root'); }); test("{ helper: 'original' }, fixed, with scroll offset on root and parent", function() { @@ -595,8 +595,8 @@ test("{ helper: 'original' }, fixed, with scroll offset on root and parent", fun setScroll('root'); testScroll('absolute'); - restoreScroll(); - restoreScroll('root'); + TestHelpers.restoreScroll(); + TestHelpers.restoreScroll('root'); }); @@ -639,7 +639,7 @@ test("{ helper: 'clone' }, absolute with scroll offset on parent", function() { drag(el, 1, 1); deepEqual({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - restoreScroll(); + TestHelpers.restoreScroll(); }); @@ -668,7 +668,7 @@ test("{ helper: 'clone' }, absolute with scroll offset on root", function() { drag(el, 1, 1); deepEqual({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - restoreScroll('root'); + TestHelpers.restoreScroll('root'); }); @@ -698,8 +698,8 @@ test("{ helper: 'clone' }, absolute with scroll offset on root and parent", func drag(el, 1, 1); deepEqual({ top: helperOffset.top-1, left: helperOffset.left-1 }, origOffset, 'dragged[' + dragged.dx + ', ' + dragged.dy + '] '); - restoreScroll('root'); - restoreScroll(); + TestHelpers.restoreScroll('root'); + TestHelpers.restoreScroll(); }); @@ -710,7 +710,7 @@ test("{ opacity: 0.5 }", function() { var opacity = null; el = $("#draggable2").draggable({ opacity: 0.5, - start: function(event, ui) { + start: function() { opacity = $(this).css("opacity"); } }); @@ -726,11 +726,11 @@ test("{ zIndex: 10 }", function() { expect(1); var actual, - expected = 10, - zIndex = null; + expected = 10; + el = $("#draggable2").draggable({ zIndex: expected, - start: function(event, ui) { + start: function() { actual = $(this).css("zIndex"); } }); -- cgit v1.2.3