@@ -63,7 +63,7 @@ describe('select box and lasso', function() {
6363 . then ( done ) ;
6464 } ) ;
6565
66- it ( 'should trigger events' , function ( done ) {
66+ it ( 'should trigger selecting/selected/deselect events' , function ( done ) {
6767 var selectingCnt = 0 ,
6868 selectingData ;
6969 gd . on ( 'plotly_selecting' , function ( data ) {
@@ -85,7 +85,7 @@ describe('select box and lasso', function() {
8585
8686 drag ( [ [ 100 , 200 ] , [ 150 , 200 ] ] ) ;
8787
88- expect ( selectingCnt ) . toEqual ( 1 ) ;
88+ expect ( selectingCnt ) . toEqual ( 1 , 'with the correct selecting count' ) ;
8989 expect ( selectingData . points ) . toEqual ( [ {
9090 curveNumber : 0 ,
9191 pointNumber : 0 ,
@@ -96,13 +96,13 @@ describe('select box and lasso', function() {
9696 pointNumber : 1 ,
9797 x : 0.004 ,
9898 y : 12.5
99- } ] ) ;
99+ } ] , 'with the correct selecting points' ) ;
100100 assertRange ( selectingData . range , {
101101 x : [ 0.0019667582669138295 , 0.004546754982054625 ] ,
102102 y : [ 0.10209191961595454 , 24.512223978291406 ]
103- } ) ;
103+ } , 'with the correct selecting range' ) ;
104104
105- expect ( selectedCnt ) . toEqual ( 1 ) ;
105+ expect ( selectedCnt ) . toEqual ( 1 , 'with the correct selected count' ) ;
106106 expect ( selectedData . points ) . toEqual ( [ {
107107 curveNumber : 0 ,
108108 pointNumber : 0 ,
@@ -113,14 +113,14 @@ describe('select box and lasso', function() {
113113 pointNumber : 1 ,
114114 x : 0.004 ,
115115 y : 12.5
116- } ] ) ;
116+ } ] , 'with the correct selected points' ) ;
117117 assertRange ( selectedData . range , {
118118 x : [ 0.0019667582669138295 , 0.004546754982054625 ] ,
119119 y : [ 0.10209191961595454 , 24.512223978291406 ]
120- } ) ;
120+ } , 'with the correct selected range' ) ;
121121
122122 doubleClick ( 250 , 200 , function ( ) {
123- expect ( doubleClickData ) . toBe ( null ) ;
123+ expect ( doubleClickData ) . toBe ( null , 'with the correct deselect data' ) ;
124124 done ( ) ;
125125 } ) ;
126126 } ) ;
@@ -139,7 +139,7 @@ describe('select box and lasso', function() {
139139 . then ( done ) ;
140140 } ) ;
141141
142- it ( 'should trigger events' , function ( done ) {
142+ it ( 'should trigger selecting/selected/deselect events' , function ( done ) {
143143 var selectingCnt = 0 ,
144144 selectingData ;
145145 gd . on ( 'plotly_selecting' , function ( data ) {
@@ -161,24 +161,24 @@ describe('select box and lasso', function() {
161161
162162 drag ( [ [ 331 , 178 ] , [ 333 , 246 ] , [ 350 , 250 ] , [ 343 , 176 ] ] ) ;
163163
164- expect ( selectingCnt ) . toEqual ( 3 ) ;
164+ expect ( selectingCnt ) . toEqual ( 3 , 'with the correct selecting count' ) ;
165165 expect ( selectingData . points ) . toEqual ( [ {
166166 curveNumber : 0 ,
167167 pointNumber : 10 ,
168168 x : 0.099 ,
169169 y : 2.75
170- } ] ) ;
170+ } ] , 'with the correct selecting points' ) ;
171171
172- expect ( selectedCnt ) . toEqual ( 1 ) ;
172+ expect ( selectedCnt ) . toEqual ( 1 , 'with the correct selected count' ) ;
173173 expect ( selectedData . points ) . toEqual ( [ {
174174 curveNumber : 0 ,
175175 pointNumber : 10 ,
176176 x : 0.099 ,
177177 y : 2.75
178- } ] ) ;
178+ } ] , 'with the correct selected points' ) ;
179179
180180 doubleClick ( 250 , 200 , function ( ) {
181- expect ( doubleClickData ) . toBe ( null ) ;
181+ expect ( doubleClickData ) . toBe ( null , 'with the correct deselect data' ) ;
182182 done ( ) ;
183183 } ) ;
184184 } ) ;
0 commit comments