@@ -4060,7 +4060,7 @@ describe('hover distance', function() {
4060
4060
} ) ;
4061
4061
} ) ;
4062
4062
4063
- it ( 'responds to hoverdistance change' , function ( ) {
4063
+ it ( 'responds to hoverdistance change' , function ( done ) {
4064
4064
var gd = document . getElementById ( 'graph' ) ;
4065
4065
var evt = { xpx : 475 , ypx : 180 } ;
4066
4066
Plotly . relayout ( gd , 'hoverdistance' , 30 )
@@ -4078,11 +4078,13 @@ describe('hover distance', function() {
4078
4078
nums : '(2, 3)' ,
4079
4079
name : 'trace 0'
4080
4080
} ) ;
4081
- } ) ;
4081
+ } )
4082
+ . catch ( failTest )
4083
+ . then ( done ) ;
4082
4084
} ) ;
4083
4085
4084
4086
it ( 'correctly responds to setting the hoverdistance to -1 by increasing ' +
4085
- 'the range of search for points to hover to Infinity' , function ( ) {
4087
+ 'the range of search for points to hover to Infinity' , function ( done ) {
4086
4088
var gd = document . getElementById ( 'graph' ) ;
4087
4089
var evt = { xpx : 475 , ypx : 180 } ;
4088
4090
Plotly . relayout ( gd , 'hoverdistance' , - 1 )
@@ -4100,7 +4102,9 @@ describe('hover distance', function() {
4100
4102
nums : '(2, 3)' ,
4101
4103
name : 'trace 0'
4102
4104
} ) ;
4103
- } ) ;
4105
+ } )
4106
+ . catch ( failTest )
4107
+ . then ( done ) ;
4104
4108
} ) ;
4105
4109
} ) ;
4106
4110
@@ -4139,18 +4143,20 @@ describe('hover distance', function() {
4139
4143
} ) ;
4140
4144
} ) ;
4141
4145
4142
- it ( 'responds to hoverdistance change from 10 to 30 (part 1)' , function ( ) {
4146
+ it ( 'responds to hoverdistance change from 10 to 30 (part 1)' , function ( done ) {
4143
4147
var gd = document . getElementById ( 'graph' ) ;
4144
4148
var evt = { xpx : 450 , ypx : 155 } ;
4145
4149
Plotly . relayout ( gd , 'hoverdistance' , 10 )
4146
4150
. then ( function ( ) {
4147
4151
Fx . hover ( 'graph' , evt , 'xy' ) ;
4148
4152
4149
4153
expect ( gd . _hoverdata ) . toEqual ( undefined ) ;
4150
- } ) ;
4154
+ } )
4155
+ . catch ( failTest )
4156
+ . then ( done ) ;
4151
4157
} ) ;
4152
4158
4153
- it ( 'responds to hoverdistance change from 10 to 30 (part 2)' , function ( ) {
4159
+ it ( 'responds to hoverdistance change from 10 to 30 (part 2)' , function ( done ) {
4154
4160
var gd = document . getElementById ( 'graph' ) ;
4155
4161
var evt = { xpx : 450 , ypx : 155 } ;
4156
4162
Plotly . relayout ( gd , 'hoverdistance' , 30 )
@@ -4169,7 +4175,9 @@ describe('hover distance', function() {
4169
4175
axis : '2' ,
4170
4176
name : 'trace 0'
4171
4177
} ) ;
4172
- } ) ;
4178
+ } )
4179
+ . catch ( failTest )
4180
+ . then ( done ) ;
4173
4181
} ) ;
4174
4182
4175
4183
it ( 'responds to hoverdistance change from default to 0 (part 1)' , function ( ) {
@@ -4191,15 +4199,17 @@ describe('hover distance', function() {
4191
4199
} ) ;
4192
4200
} ) ;
4193
4201
4194
- it ( 'responds to hoverdistance change from default to 0 (part 2)' , function ( ) {
4202
+ it ( 'responds to hoverdistance change from default to 0 (part 2)' , function ( done ) {
4195
4203
var gd = document . getElementById ( 'graph' ) ;
4196
4204
var evt = { xpx : 475 , ypx : 155 } ;
4197
4205
Plotly . relayout ( gd , 'hoverdistance' , 0 )
4198
4206
. then ( function ( ) {
4199
4207
Fx . hover ( 'graph' , evt , 'xy' ) ;
4200
4208
4201
4209
expect ( gd . _hoverdata ) . toEqual ( undefined ) ;
4202
- } ) ;
4210
+ } )
4211
+ . catch ( failTest )
4212
+ . then ( done ) ;
4203
4213
} ) ;
4204
4214
4205
4215
it ( 'responds to setting the hoverdistance to -1 by increasing ' +
@@ -4212,7 +4222,7 @@ describe('hover distance', function() {
4212
4222
} ) ;
4213
4223
4214
4224
it ( 'responds to setting the hoverdistance to -1 by increasing ' +
4215
- 'the range of search for points to hover to Infinity (part 2)' , function ( ) {
4225
+ 'the range of search for points to hover to Infinity (part 2)' , function ( done ) {
4216
4226
var gd = document . getElementById ( 'graph' ) ;
4217
4227
var evt = { xpx : 450 , ypx : 155 } ;
4218
4228
Plotly . relayout ( gd , 'hoverdistance' , - 1 )
@@ -4230,7 +4240,9 @@ describe('hover distance', function() {
4230
4240
nums : '(2, 3)' ,
4231
4241
name : 'trace 0'
4232
4242
} ) ;
4233
- } ) ;
4243
+ } )
4244
+ . catch ( failTest )
4245
+ . then ( done ) ;
4234
4246
} ) ;
4235
4247
} ) ;
4236
4248
0 commit comments