Skip to content

Commit 2298125

Browse files
committed
test: add tolerance in mapbox tolerance tests
1 parent 27f8c92 commit 2298125

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/jasmine/tests/mapbox_test.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,9 @@ describe('mapbox plots', function() {
448448
expect(mapInfo.zoom).toBeCloseTo(zoom);
449449

450450
var divStyle = mapInfo.div.style;
451-
var expectedDims = ['left', 'top', 'width', 'height'].map(function(p) {
452-
return parseFloat(divStyle[p]);
451+
['left', 'top', 'width', 'height'].forEach(function(p, i) {
452+
expect(parseFloat(divStyle[p])).toBeWithin(dims[i], 5);
453453
});
454-
455-
expect(expectedDims).toBeCloseToArray(dims);
456454
}
457455

458456
assertLayout('Mapbox Dark', [-4.710, 19.475], 1.234, [80, 100, 908, 270]);

0 commit comments

Comments
 (0)