Skip to content

Commit

Permalink
don't test for most common pixels when using methods that can lead to…
Browse files Browse the repository at this point in the history
… extremes like first, min or max
  • Loading branch information
DanielJDufour committed Jul 24, 2023
1 parent cb06148 commit c90f84c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const runTileTests = async ({
counts = count(result.data, { depth: 2 });
const sortedCounts = Object.entries(counts).sort((a, b) => Math.sign(b[1] - a[1]));
const top = sortedCounts[0][0];
if (method !== "first" && !out_bands) {
if (!["first", "min", "max"].includes(method) && !out_bands) {
try {
eq(most_common_pixels.includes(top), true);
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const runTileTests = async ({
counts = count(result.data, { depth: 2 });
const sortedCounts = Object.entries(counts).sort((a, b) => Math.sign(b[1] - a[1]));
const top = sortedCounts[0][0];
if (method !== "first" && !out_bands) {
if (!["first", "min", "max"].includes(method) && !out_bands) {
try {
eq(most_common_pixels.includes(top), true);
} catch (error) {
Expand Down

0 comments on commit c90f84c

Please sign in to comment.