1
1
define ( [
2
+ "qunit" ,
2
3
"jquery" ,
3
4
"./helper" ,
4
5
"ui/widgets/sortable"
5
- ] , function ( $ , testHelper ) {
6
+ ] , function ( QUnit , $ , testHelper ) {
6
7
7
- module ( "sortable: core" ) ;
8
+ QUnit . module ( "sortable: core" ) ;
8
9
9
- test ( "#9314: Sortable: Items cannot be dragged directly into bottom position" , function ( ) {
10
- expect ( 1 ) ;
10
+ QUnit . test ( "#9314: Sortable: Items cannot be dragged directly into bottom position" , function ( assert ) {
11
+ assert . expect ( 1 ) ;
11
12
12
13
var el = $ ( ".connectWith" ) . sortable ( {
13
14
connectWith : ".connectWith"
14
15
} ) ;
15
16
16
- testHelper . sort ( $ ( "li" , el [ 1 ] ) [ 0 ] , 0 , - 12 , 5 , "Dragging the sortable into connected sortable" ) ;
17
+ testHelper . sort ( assert , $ ( "li" , el [ 1 ] ) [ 0 ] , 0 , - 12 , 5 , "Dragging the sortable into connected sortable" ) ;
17
18
} ) ;
18
19
19
- test ( "ui-sortable-handle applied to appropriate element" , function ( assert ) {
20
- expect ( 8 ) ;
20
+ QUnit . test ( "ui-sortable-handle applied to appropriate element" , function ( assert ) {
21
+ assert . expect ( 8 ) ;
21
22
var item = "<li><p></p></li>" ,
22
23
el = $ ( "<ul>" + item + item + "</ul>" )
23
24
. sortable ( )
@@ -36,7 +37,7 @@ test( "ui-sortable-handle applied to appropriate element", function( assert ) {
36
37
assert . hasClasses ( el . find ( "p:last" ) , "ui-sortable-handle" ) ;
37
38
38
39
el . sortable ( "destroy" ) ;
39
- equal ( el . find ( ".ui-sortable-handle" ) . length , 0 , "class name removed on destroy" ) ;
40
+ assert . equal ( el . find ( ".ui-sortable-handle" ) . length , 0 , "class name removed on destroy" ) ;
40
41
} ) ;
41
42
42
43
} ) ;
0 commit comments