Skip to content

Commit 8b49d3c

Browse files
committed
add tolerance to _derived.coordinates event data test
.. to make the test pass on etpinard's laptop
1 parent 9aadcf0 commit 8b49d3c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/jasmine/tests/mapbox_test.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -1329,13 +1329,13 @@ describe('@noCI, mapbox plots', function() {
13291329

13301330
expect([evtData['mapbox.center'].lon, evtData['mapbox.center'].lat]).toBeCloseToArray(center);
13311331
expect(evtData['mapbox.zoom']).toBeCloseTo(zoom);
1332-
expect(evtData['mapbox._derived']).toEqual({
1333-
coordinates: [
1334-
[lon0, lat1],
1335-
[lon1, lat1],
1336-
[lon1, lat0],
1337-
[lon0, lat0]
1338-
]});
1332+
expect(Object.keys(evtData['mapbox._derived'])).toEqual(['coordinates']);
1333+
expect(evtData['mapbox._derived'].coordinates).toBeCloseTo2DArray([
1334+
[lon0, lat1],
1335+
[lon1, lat1],
1336+
[lon1, lat0],
1337+
[lon0, lat0]
1338+
], -0.1);
13391339
}
13401340

13411341
_assertLayout([-4.710, 19.475], 1.234);

0 commit comments

Comments
 (0)