Skip to content

Commit c90f84c

Browse files
committed
don't test for most common pixels when using methods that can lead to extremes like first, min or max
1 parent cb06148 commit c90f84c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ const runTileTests = async ({
262262
counts = count(result.data, { depth: 2 });
263263
const sortedCounts = Object.entries(counts).sort((a, b) => Math.sign(b[1] - a[1]));
264264
const top = sortedCounts[0][0];
265-
if (method !== "first" && !out_bands) {
265+
if (!["first", "min", "max"].includes(method) && !out_bands) {
266266
try {
267267
eq(most_common_pixels.includes(top), true);
268268
} catch (error) {

test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ const runTileTests = async ({
272272
counts = count(result.data, { depth: 2 });
273273
const sortedCounts = Object.entries(counts).sort((a, b) => Math.sign(b[1] - a[1]));
274274
const top = sortedCounts[0][0];
275-
if (method !== "first" && !out_bands) {
275+
if (!["first", "min", "max"].includes(method) && !out_bands) {
276276
try {
277277
eq(most_common_pixels.includes(top), true);
278278
} catch (error) {

0 commit comments

Comments
 (0)