@@ -293,9 +293,6 @@ describe('spikeline hover', function() {
293293 it ( 'does not show spikes if no points are hovered in the spikesnap "hovered data" mode' , function ( done ) {
294294 var _mock = makeMock ( 'toaxis' , 'x' ) ;
295295 Plotly . newPlot ( gd , _mock )
296- . then ( function ( ) {
297- _setSpikedistance ( - 1 ) ;
298- } )
299296 . then ( function ( ) {
300297 _hover ( { xval : 1.5 } ) ;
301298 _assert (
@@ -388,33 +385,32 @@ describe('spikeline hover', function() {
388385 it ( 'correctly responds to setting the spikedistance to -1 by increasing ' +
389386 'the range of search for points to draw the spikelines to Infinity' , function ( done ) {
390387 var _mock = makeMock ( 'toaxis' , 'closest' ) ;
391- _mock . layout . spikedistance = 20 ;
392388
393389 Plotly . newPlot ( gd , _mock ) . then ( function ( ) {
394390 _hover ( { xval : 1.6 , yval : 2.6 } ) ;
395391 _assert (
396- [ ] ,
397- [ ]
392+ [ [ 557 , 401 , 557 , 250 ] , [ 80 , 250 , 557 , 250 ] ] ,
393+ [ [ 83 , 250 ] ]
398394 ) ;
399395
400396 _hover ( { xval : 26 , yval : 36 } , 'x2y2' ) ;
401397 _assert (
402- [ ] ,
398+ [ [ 820 , 220 , 820 , 167 ] ] ,
403399 [ ]
404400 ) ;
405401
406- _setSpikedistance ( - 1 ) ;
402+ _setSpikedistance ( 20 ) ;
407403 } )
408404 . then ( function ( ) {
409405 _hover ( { xval : 1.6 , yval : 2.6 } ) ;
410406 _assert (
411- [ [ 557 , 401 , 557 , 250 ] , [ 80 , 250 , 557 , 250 ] ] ,
412- [ [ 83 , 250 ] ]
407+ [ ] ,
408+ [ ]
413409 ) ;
414410
415411 _hover ( { xval : 26 , yval : 36 } , 'x2y2' ) ;
416412 _assert (
417- [ [ 820 , 220 , 820 , 167 ] ] ,
413+ [ ] ,
418414 [ ]
419415 ) ;
420416 } )
0 commit comments