Skip to content

Commit 4edb5fc

Browse files
committed
decrease tolerance for flaky baselines namely mapbox
1 parent 6076d72 commit 4edb5fc

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/image/compare_pixels_test.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,17 @@ for(var i = 0; i < allMockList.length; i++) {
114114
height: height
115115
});
116116

117-
var shouldBePixelPerfect = mockName.substr(0, 7) !== 'mapbox_' && [
117+
var isMapbox = mockName.substr(0, 7) === 'mapbox_';
118+
var isOtherFlaky = [
118119
// list flaky mocks other than mapbox:
119120
'gl3d_bunny-hull'
120-
].indexOf(mockName) === -1;
121+
].indexOf(mockName) !== -1;
122+
123+
var shouldBePixelPerfect = !(isMapbox || isOtherFlaky);
121124

122125
var numDiffPixels = pixelmatch(img0.data, img1.data, diff.data, width, height, {
123-
threshold: shouldBePixelPerfect ? 0 : 0.2
126+
threshold: shouldBePixelPerfect ? 0 :
127+
mockName === 'mapbox_geojson-attributes' ? 0.2 : 0.15
124128
});
125129

126130
if(numDiffPixels) {

0 commit comments

Comments
 (0)