This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 12
12
$ . each ( events , function ( i , name ) {
13
13
$ ( "#main" ) . unbind ( name ) ;
14
14
} ) ;
15
+
16
+ $ ( $ . event . special . scrollstart ) . unbind ( "scrollstart" ) ;
15
17
}
16
18
} ) ;
17
19
55
57
ok ( $ . attrFn [ name ] ) ;
56
58
} ) ;
57
59
} ) ;
60
+
61
+ test ( "scrollstart enabled defaults to true" , function ( ) {
62
+ $ . event . special . scrollstart . enabled = false ;
63
+ $ . testHelper . reloadLib ( libName ) ;
64
+ ok ( $ . event . special . scrollstart . enabled ) ;
65
+ } ) ;
66
+
67
+ test ( "scrollstart setup binds a function that returns when its disabled" , function ( ) {
68
+ expect ( 0 ) ;
69
+ $ . event . special . scrollstart . enabled = false ;
70
+
71
+ $ ( $ . event . special . scrollstart ) . bind ( "scrollstart" , function ( ) {
72
+ ok ( false ) ;
73
+ } ) ;
74
+
75
+ console . log ( "foo" ) ;
76
+ $ ( $ . event . special . scrollstart ) . trigger ( "touchmove" ) ;
77
+ } ) ;
78
+
79
+ test ( "scrollstart setup binds a function that triggers scroll start when enabled" , function ( ) {
80
+ $ . event . special . scrollstart . enabled = true ;
81
+
82
+ $ ( $ . event . special . scrollstart ) . bind ( "scrollstart" , function ( ) {
83
+ ok ( true ) ;
84
+ } ) ;
85
+
86
+ $ ( $ . event . special . scrollstart ) . trigger ( "touchmove" ) ;
87
+ } ) ;
58
88
} ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments