aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/sortable/core.js
diff options
context:
space:
mode:
authorAmanpreet Singh <apsdehal@gmail.com>2016-04-06 18:52:59 +0530
committerAmanpreet Singh <apsdehal@gmail.com>2016-04-14 00:14:57 +0530
commit749f95ee0ab25b7ee03b3def88ec5bc604ab9929 (patch)
tree584597827513f6ce1930d4b85ab1371a3513749d /tests/unit/sortable/core.js
parent38d473708b6af4166ca01c938325f8910e66cf22 (diff)
downloadjquery-ui-749f95ee0ab25b7ee03b3def88ec5bc604ab9929.tar.gz
jquery-ui-749f95ee0ab25b7ee03b3def88ec5bc604ab9929.zip
Sortable: Shift to use no globals
Diffstat (limited to 'tests/unit/sortable/core.js')
-rw-r--r--tests/unit/sortable/core.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/unit/sortable/core.js b/tests/unit/sortable/core.js
index d12416f09..2bb11edbe 100644
--- a/tests/unit/sortable/core.js
+++ b/tests/unit/sortable/core.js
@@ -1,23 +1,24 @@
define( [
+ "qunit",
"jquery",
"./helper",
"ui/widgets/sortable"
-], function( $, testHelper ) {
+], function( QUnit, $, testHelper ) {
-module( "sortable: core" );
+QUnit.module( "sortable: core" );
-test( "#9314: Sortable: Items cannot be dragged directly into bottom position", function() {
- expect( 1 );
+QUnit.test( "#9314: Sortable: Items cannot be dragged directly into bottom position", function( assert ) {
+ assert.expect( 1 );
var el = $( ".connectWith" ).sortable( {
connectWith: ".connectWith"
} );
- testHelper.sort( $( "li", el[ 1 ] )[ 0 ], 0, -12, 5, "Dragging the sortable into connected sortable" );
+ testHelper.sort( assert, $( "li", el[ 1 ] )[ 0 ], 0, -12, 5, "Dragging the sortable into connected sortable" );
} );
-test( "ui-sortable-handle applied to appropriate element", function( assert ) {
- expect( 8 );
+QUnit.test( "ui-sortable-handle applied to appropriate element", function( assert ) {
+ assert.expect( 8 );
var item = "<li><p></p></li>",
el = $( "<ul>" + item + item + "</ul>" )
.sortable()
@@ -36,7 +37,7 @@ test( "ui-sortable-handle applied to appropriate element", function( assert ) {
assert.hasClasses( el.find( "p:last" ), "ui-sortable-handle" );
el.sortable( "destroy" );
- equal( el.find( ".ui-sortable-handle" ).length, 0, "class name removed on destroy" );
+ assert.equal( el.find( ".ui-sortable-handle" ).length, 0, "class name removed on destroy" );
} );
} );