Skip to content

Commit 811073e

Browse files
committed
clean up geo_test for new throttle
and increase tolerance to get all tests passing locally
1 parent b6d64be commit 811073e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/jasmine/tests/geo_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ describe('Test geo interactions', function() {
12181218
expect(d3.selectAll('g.hovertext').size())
12191219
.toBe(hoverLabelCnt, 'for ' + lonlat);
12201220

1221-
delete gd._lastHoverTime;
1221+
Lib.clearThrottle();
12221222
}
12231223

12241224
Plotly.plot(gd, fig).then(function() {
@@ -1301,7 +1301,7 @@ describe('Test geo interactions', function() {
13011301
mouseEvent('mousemove', px[0], px[1]);
13021302
expect(d3.selectAll('g.hovertext').size()).toBe(hoverLabelCnt, msg);
13031303

1304-
delete gd._lastHoverTime;
1304+
Lib.clearThrottle();
13051305
}
13061306

13071307
Plotly.newPlot(gd, [{
@@ -1954,8 +1954,8 @@ describe('Test geo zoom/pan/drag interactions:', function() {
19541954
var center = geoLayout.center;
19551955
var scale = geoLayout.projection.scale;
19561956

1957-
expect(center.lon).toBeCloseTo(attr[0][0], 1, msg + 'center.lon');
1958-
expect(center.lat).toBeCloseTo(attr[0][1], 1, msg + 'center.lat');
1957+
expect(center.lon).toBeCloseTo(attr[0][0], 0.5, msg + 'center.lon');
1958+
expect(center.lat).toBeCloseTo(attr[0][1], 0.5, msg + 'center.lat');
19591959
expect(scale).toBeCloseTo(attr[1], 1, msg + 'zoom');
19601960

19611961
// albersUsa projection does not have a center() method

0 commit comments

Comments
 (0)