aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-04-18 22:46:39 -0400
committerScott González <scott.gonzalez@gmail.com>2012-04-18 22:46:39 -0400
commita0fb2c227e66c7b034726943a96360829a5ad3b2 (patch)
treecc5b3ab35eddae14aff621bd7b5c5c0659a4b50e /tests/unit/selectable
parenta28983086ee91b19200c47fadc6bc3ba58a0fcb9 (diff)
downloadjquery-ui-a0fb2c227e66c7b034726943a96360829a5ad3b2.tar.gz
jquery-ui-a0fb2c227e66c7b034726943a96360829a5ad3b2.zip
Tests: Lint.
Diffstat (limited to 'tests/unit/selectable')
-rw-r--r--tests/unit/selectable/selectable_methods.js16
-rw-r--r--tests/unit/selectable/selectable_options.js6
2 files changed, 12 insertions, 10 deletions
diff --git a/tests/unit/selectable/selectable_methods.js b/tests/unit/selectable/selectable_methods.js
index 32dfe00ed..dbc88f269 100644
--- a/tests/unit/selectable/selectable_methods.js
+++ b/tests/unit/selectable/selectable_methods.js
@@ -20,7 +20,7 @@ test("init", function() {
$("<div></div>").selectable().selectable("foo").remove();
ok(true, 'arbitrary method called after init');
- el = $("<div></div>").selectable()
+ el = $("<div></div>").selectable();
var foo = el.selectable("option", "foo");
el.remove();
ok(true, 'arbitrary option getter after init');
@@ -49,7 +49,8 @@ test("destroy", function() {
test("enable", function() {
expect(3);
- var fired = false;
+ var expected, actual,
+ fired = false;
el = $("#selectable1");
el.selectable({
@@ -63,14 +64,15 @@ test("enable", function() {
equal(fired, true, "start fired");
el.selectable("destroy");
- var expected = $('<div></div>').selectable(),
- actual = expected.selectable('enable');
+ expected = $('<div></div>').selectable();
+ actual = expected.selectable('enable');
equal(actual, expected, 'enable is chainable');
});
test("disable", function() {
expect(3);
- var fired = false;
+ var expected, actual,
+ fired = false;
el = $("#selectable1");
el.selectable({
@@ -85,8 +87,8 @@ test("disable", function() {
equal(fired, false, "start fired");
el.selectable("destroy");
- var expected = $('<div></div>').selectable(),
- actual = expected.selectable('disable');
+ expected = $('<div></div>').selectable();
+ actual = expected.selectable('disable');
equal(actual, expected, 'disable is chainable');
});
diff --git a/tests/unit/selectable/selectable_options.js b/tests/unit/selectable/selectable_options.js
index 2bc44e6e0..be9fdf5fe 100644
--- a/tests/unit/selectable/selectable_options.js
+++ b/tests/unit/selectable/selectable_options.js
@@ -8,7 +8,7 @@ module("selectable: options");
test("autoRefresh", function() {
expect(3);
el = $("#selectable1");
- var actual, sel = $("*", el), selected = function() { actual += 1 };
+ var actual, sel = $("*", el), selected = function() { actual += 1; };
actual = 0;
el = $("#selectable1").selectable({ autoRefresh: false, selected: selected });
@@ -33,12 +33,12 @@ test("autoRefresh", function() {
test("filter", function() {
expect(2);
el = $("#selectable1");
- var actual, sel = $("*", el), selected = function() { actual += 1 };
+ var actual, sel = $("*", el), selected = function() { actual += 1; };
actual = 0;
el = $("#selectable1").selectable({ filter: '.special', selected: selected });
drag(1000, 1000);
- ok(sel.length != 1, "this test assumes more than 1 selectee");
+ ok(sel.length !== 1, "this test assumes more than 1 selectee");
equal(actual, 1);
el.selectable("destroy");
});