Skip to content

Commit 1694bb4

Browse files
committed
fix missing catch and done in hover_label tests
1 parent 2853691 commit 1694bb4

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

test/jasmine/tests/hover_label_test.js

+24-12
Original file line numberDiff line numberDiff line change
@@ -4060,7 +4060,7 @@ describe('hover distance', function() {
40604060
});
40614061
});
40624062

4063-
it('responds to hoverdistance change', function() {
4063+
it('responds to hoverdistance change', function(done) {
40644064
var gd = document.getElementById('graph');
40654065
var evt = { xpx: 475, ypx: 180 };
40664066
Plotly.relayout(gd, 'hoverdistance', 30)
@@ -4078,11 +4078,13 @@ describe('hover distance', function() {
40784078
nums: '(2, 3)',
40794079
name: 'trace 0'
40804080
});
4081-
});
4081+
})
4082+
.catch(failTest)
4083+
.then(done);
40824084
});
40834085

40844086
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) {
40864088
var gd = document.getElementById('graph');
40874089
var evt = { xpx: 475, ypx: 180 };
40884090
Plotly.relayout(gd, 'hoverdistance', -1)
@@ -4100,7 +4102,9 @@ describe('hover distance', function() {
41004102
nums: '(2, 3)',
41014103
name: 'trace 0'
41024104
});
4103-
});
4105+
})
4106+
.catch(failTest)
4107+
.then(done);
41044108
});
41054109
});
41064110

@@ -4139,18 +4143,20 @@ describe('hover distance', function() {
41394143
});
41404144
});
41414145

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) {
41434147
var gd = document.getElementById('graph');
41444148
var evt = { xpx: 450, ypx: 155 };
41454149
Plotly.relayout(gd, 'hoverdistance', 10)
41464150
.then(function() {
41474151
Fx.hover('graph', evt, 'xy');
41484152

41494153
expect(gd._hoverdata).toEqual(undefined);
4150-
});
4154+
})
4155+
.catch(failTest)
4156+
.then(done);
41514157
});
41524158

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) {
41544160
var gd = document.getElementById('graph');
41554161
var evt = { xpx: 450, ypx: 155 };
41564162
Plotly.relayout(gd, 'hoverdistance', 30)
@@ -4169,7 +4175,9 @@ describe('hover distance', function() {
41694175
axis: '2',
41704176
name: 'trace 0'
41714177
});
4172-
});
4178+
})
4179+
.catch(failTest)
4180+
.then(done);
41734181
});
41744182

41754183
it('responds to hoverdistance change from default to 0 (part 1)', function() {
@@ -4191,15 +4199,17 @@ describe('hover distance', function() {
41914199
});
41924200
});
41934201

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) {
41954203
var gd = document.getElementById('graph');
41964204
var evt = { xpx: 475, ypx: 155 };
41974205
Plotly.relayout(gd, 'hoverdistance', 0)
41984206
.then(function() {
41994207
Fx.hover('graph', evt, 'xy');
42004208

42014209
expect(gd._hoverdata).toEqual(undefined);
4202-
});
4210+
})
4211+
.catch(failTest)
4212+
.then(done);
42034213
});
42044214

42054215
it('responds to setting the hoverdistance to -1 by increasing ' +
@@ -4212,7 +4222,7 @@ describe('hover distance', function() {
42124222
});
42134223

42144224
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) {
42164226
var gd = document.getElementById('graph');
42174227
var evt = { xpx: 450, ypx: 155 };
42184228
Plotly.relayout(gd, 'hoverdistance', -1)
@@ -4230,7 +4240,9 @@ describe('hover distance', function() {
42304240
nums: '(2, 3)',
42314241
name: 'trace 0'
42324242
});
4233-
});
4243+
})
4244+
.catch(failTest)
4245+
.then(done);
42344246
});
42354247
});
42364248

0 commit comments

Comments
 (0)