aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/droppable
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/droppable
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/droppable')
-rw-r--r--tests/unit/droppable/droppable_core.js12
-rw-r--r--tests/unit/droppable/droppable_events.js4
-rw-r--r--tests/unit/droppable/droppable_methods.js16
3 files changed, 18 insertions, 14 deletions
diff --git a/tests/unit/droppable/droppable_core.js b/tests/unit/droppable/droppable_core.js
index 3f709d25d..1ec50eecc 100644
--- a/tests/unit/droppable/droppable_core.js
+++ b/tests/unit/droppable/droppable_core.js
@@ -2,15 +2,15 @@
* droppable_core.js
*/
-var el, drg;
+var el;
-function shouldBeDroppable() {
+TestHelpers.shouldBeDroppable = function() {
ok(false, 'missing test - untested code is broken code');
-}
+};
-function shouldNotBeDroppable() {
+TestHelpers.shouldNotBeDroppable = function() {
ok(false, 'missing test - untested code is broken code');
-}
+};
(function($) {
@@ -27,7 +27,7 @@ test("element types", function() {
el = $(document.createElement(typeName)).appendTo('body');
(typeName === 'table' && el.append("<tr><td>content</td></tr>"));
el.droppable();
- shouldBeDroppable();
+ TestHelpers.shouldBeDroppable();
el.droppable("destroy");
el.remove();
});
diff --git a/tests/unit/droppable/droppable_events.js b/tests/unit/droppable/droppable_events.js
index f22a03540..2e01b0c9c 100644
--- a/tests/unit/droppable/droppable_events.js
+++ b/tests/unit/droppable/droppable_events.js
@@ -5,6 +5,10 @@
module("droppable: events");
+// this is here to make JSHint pass "unused", and we don't want to
+// remove the parameter for when we finally implement
+$.noop();
+
test("activate", function() {
ok(false, 'missing test - untested code is broken code');
});
diff --git a/tests/unit/droppable/droppable_methods.js b/tests/unit/droppable/droppable_methods.js
index 8fd49d265..51581b425 100644
--- a/tests/unit/droppable/droppable_methods.js
+++ b/tests/unit/droppable/droppable_methods.js
@@ -48,16 +48,16 @@ test("destroy", function() {
test("enable", function() {
expect(7);
el = $("#droppable1").droppable({ disabled: true });
- shouldNotBeDroppable();
+ TestHelpers.shouldNotBeDroppable();
el.droppable("enable");
- shouldBeDroppable();
+ TestHelpers.shouldBeDroppable();
equal(el.droppable("option", "disabled"), false, "disabled option getter");
el.droppable("destroy");
el.droppable({ disabled: true });
- shouldNotBeDroppable();
+ TestHelpers.shouldNotBeDroppable();
el.droppable("option", "disabled", false);
equal(el.droppable("option", "disabled"), false, "disabled option setter");
- shouldBeDroppable();
+ TestHelpers.shouldBeDroppable();
var expected = $('<div></div>').droppable(),
actual = expected.droppable('enable');
@@ -67,16 +67,16 @@ test("enable", function() {
test("disable", function() {
expect(7);
el = $("#droppable1").droppable({ disabled: false });
- shouldBeDroppable();
+ TestHelpers.shouldBeDroppable();
el.droppable("disable");
- shouldNotBeDroppable();
+ TestHelpers.shouldNotBeDroppable();
equal(el.droppable("option", "disabled"), true, "disabled option getter");
el.droppable("destroy");
el.droppable({ disabled: false });
- shouldBeDroppable();
+ TestHelpers.shouldBeDroppable();
el.droppable("option", "disabled", true);
equal(el.droppable("option", "disabled"), true, "disabled option setter");
- shouldNotBeDroppable();
+ TestHelpers.shouldNotBeDroppable();
var expected = $('<div></div>').droppable(),
actual = expected.droppable('disable');