@@ -754,6 +754,7 @@ describe('hover info on overlaid subplots', function() {
754754describe ( 'hover after resizing' , function ( ) {
755755 'use strict' ;
756756
757+ var gd ;
757758 afterEach ( destroyGraphDiv ) ;
758759
759760 function _click ( pos ) {
@@ -767,22 +768,17 @@ describe('hover after resizing', function() {
767768 }
768769
769770 function assertLabelCount ( pos , cnt , msg ) {
770- return new Promise ( function ( resolve ) {
771- mouseEvent ( 'mousemove' , pos [ 0 ] , pos [ 1 ] ) ;
772-
773- setTimeout ( function ( ) {
774- var hoverText = d3 . selectAll ( 'g.hovertext' ) ;
775- expect ( hoverText . size ( ) ) . toEqual ( cnt , msg ) ;
771+ delete gd . _lastHoverTime ;
772+ mouseEvent ( 'mousemove' , pos [ 0 ] , pos [ 1 ] ) ;
776773
777- resolve ( ) ;
778- } , HOVERMINTIME ) ;
779- } ) ;
774+ var hoverText = d3 . selectAll ( 'g.hovertext' ) ;
775+ expect ( hoverText . size ( ) ) . toBe ( cnt , msg ) ;
780776 }
781777
782778 it ( 'should work' , function ( done ) {
783779 var data = [ { y : [ 2 , 1 , 2 ] } ] ,
784- layout = { width : 600 , height : 500 } ,
785- gd = createGraphDiv ( ) ;
780+ layout = { width : 600 , height : 500 } ;
781+ gd = createGraphDiv ( ) ;
786782
787783 var pos0 = [ 305 , 403 ] ,
788784 pos1 = [ 401 , 122 ] ;
0 commit comments