aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/selectable
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-11-03 16:17:16 -0400
committerMike Sherov <mike.sherov@gmail.com>2012-11-03 16:17:16 -0400
commit3df9ea29e644a3dd6345161513dae5823d9b0460 (patch)
tree08bdc053f90d110cb4af39c4de464d92ad8142c6 /tests/unit/selectable
parent68ad80c2922daccba773a9adafe9fb5efcb129a2 (diff)
downloadjquery-ui-3df9ea29e644a3dd6345161513dae5823d9b0460.tar.gz
jquery-ui-3df9ea29e644a3dd6345161513dae5823d9b0460.zip
Dev: remove globals from tests and moved test helpers to correct location - Fixed #8770 Dev: Remove globals and Standardize Test Suite
Diffstat (limited to 'tests/unit/selectable')
-rw-r--r--tests/unit/selectable/selectable.html1
-rw-r--r--tests/unit/selectable/selectable_core.js15
-rw-r--r--tests/unit/selectable/selectable_test_helpers.js12
3 files changed, 14 insertions, 14 deletions
diff --git a/tests/unit/selectable/selectable.html b/tests/unit/selectable/selectable.html
index 18ffc6ef7..13718e1f3 100644
--- a/tests/unit/selectable/selectable.html
+++ b/tests/unit/selectable/selectable.html
@@ -26,6 +26,7 @@
<script src="selectable_events.js"></script>
<script src="selectable_methods.js"></script>
<script src="selectable_options.js"></script>
+ <script src="selectable_test_helpers.js"></script>
<script src="../swarminject.js"></script>
</head>
diff --git a/tests/unit/selectable/selectable_core.js b/tests/unit/selectable/selectable_core.js
index de89e66a7..9953b6c07 100644
--- a/tests/unit/selectable/selectable_core.js
+++ b/tests/unit/selectable/selectable_core.js
@@ -1,16 +1,3 @@
/*
* selectable_core.js
- */
-
-TestHelpers.selectable = {
- drag: function drag(el, dx, dy) {
- var off = el.offset(),
- pos = { clientX: off.left, clientY: off.top };
- el.simulate("mousedown", pos);
- $(document).simulate("mousemove", pos);
- pos.clientX += dx;
- pos.clientY += dy;
- $(document).simulate("mousemove", pos);
- $(document).simulate("mouseup", pos);
- }
-}; \ No newline at end of file
+ */ \ No newline at end of file
diff --git a/tests/unit/selectable/selectable_test_helpers.js b/tests/unit/selectable/selectable_test_helpers.js
new file mode 100644
index 000000000..c707ab622
--- /dev/null
+++ b/tests/unit/selectable/selectable_test_helpers.js
@@ -0,0 +1,12 @@
+TestHelpers.selectable = {
+ drag: function(el, dx, dy) {
+ var off = el.offset(),
+ pos = { clientX: off.left, clientY: off.top };
+ el.simulate("mousedown", pos);
+ $(document).simulate("mousemove", pos);
+ pos.clientX += dx;
+ pos.clientY += dy;
+ $(document).simulate("mousemove", pos);
+ $(document).simulate("mouseup", pos);
+ }
+}; \ No newline at end of file