aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-10-23 09:36:42 -0500
committerCorey Frang <gnarf@gnarf.net>2012-10-23 09:37:46 -0500
commite1230997aa14dae6f35326c8ba20bfe2428507c2 (patch)
treef00984f5fbbf12f175c0994c497513a2d8e8ee26 /tests/unit/selectable
parent7af1ec727bcca8367e804cea77b9dd238b1c0d69 (diff)
downloadjquery-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/selectable')
-rw-r--r--tests/unit/selectable/selectable_core.js2
-rw-r--r--tests/unit/selectable/selectable_events.js4
-rw-r--r--tests/unit/selectable/selectable_methods.js2
-rw-r--r--tests/unit/selectable/selectable_options.js8
4 files changed, 8 insertions, 8 deletions
diff --git a/tests/unit/selectable/selectable_core.js b/tests/unit/selectable/selectable_core.js
index 18ea3a302..d2e885fc7 100644
--- a/tests/unit/selectable/selectable_core.js
+++ b/tests/unit/selectable/selectable_core.js
@@ -4,7 +4,7 @@
var el;
-var drag = function(dx, dy) {
+TestHelpers.selectableDrag = function drag(dx, dy) {
var off = el.offset(), pos = { clientX: off.left, clientY: off.top };
el.simulate("mousedown", pos);
$(document).simulate("mousemove", pos);
diff --git a/tests/unit/selectable/selectable_events.js b/tests/unit/selectable/selectable_events.js
index 2623818a7..bfd431bd8 100644
--- a/tests/unit/selectable/selectable_events.js
+++ b/tests/unit/selectable/selectable_events.js
@@ -9,7 +9,7 @@ test("start", function() {
expect(2);
el = $("#selectable1");
el.selectable({
- start: function(ev, ui) {
+ start: function() {
ok(true, "drag fired start callback");
equal(this, el[0], "context of callback");
}
@@ -21,7 +21,7 @@ test("stop", function() {
expect(2);
el = $("#selectable1");
el.selectable({
- start: function(ev, ui) {
+ start: function() {
ok(true, "drag fired stop callback");
equal(this, el[0], "context of callback");
}
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js
index dbc88f269..ee7242d9b 100644
--- a/tests/unit/selectable/selectable_methods.js
+++ b/tests/unit/selectable/selectable_methods.js
@@ -21,7 +21,7 @@ test("init", function() {
ok(true, 'arbitrary method called after init');
el = $("<div></div>").selectable();
- var foo = el.selectable("option", "foo");
+ el.selectable("option", "foo");
el.remove();
ok(true, 'arbitrary option getter after init');
diff --git a/tests/unit/selectable/selectable_options.js b/tests/unit/selectable/selectable_options.js
index be9fdf5fe..ad57000a9 100644
--- a/tests/unit/selectable/selectable_options.js
+++ b/tests/unit/selectable/selectable_options.js
@@ -13,7 +13,7 @@ test("autoRefresh", function() {
actual = 0;
el = $("#selectable1").selectable({ autoRefresh: false, selected: selected });
sel.hide();
- drag(1000, 1000);
+ TestHelpers.selectableDrag(1000, 1000);
equal(actual, sel.length);
el.selectable("destroy");
@@ -21,10 +21,10 @@ test("autoRefresh", function() {
sel.show();
el = $("#selectable1").selectable({ autoRefresh: true, selected: selected });
sel.hide();
- drag(1000, 1000);
+ TestHelpers.selectableDrag(1000, 1000);
equal(actual, 0);
sel.show();
- drag(1000, 1000);
+ TestHelpers.selectableDrag(1000, 1000);
equal(actual, sel.length);
el.selectable("destroy");
sel.show();
@@ -37,7 +37,7 @@ test("filter", function() {
actual = 0;
el = $("#selectable1").selectable({ filter: '.special', selected: selected });
- drag(1000, 1000);
+ TestHelpers.selectableDrag(1000, 1000);
ok(sel.length !== 1, "this test assumes more than 1 selectee");
equal(actual, 1);
el.selectable("destroy");