Skip to content

Commit 7ec24f5

Browse files
committed
back to more tolerant for checks
1 parent 71ebd2d commit 7ec24f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/unit/visual/visualTest.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export async function checkMatch(actual, expected, p5) {
135135
width,
136136
height,
137137
{
138-
threshold: 0.35,
138+
threshold: 0.6,
139139
includeAA: false,
140140
alpha: 0.1
141141
}
@@ -174,7 +174,7 @@ export async function checkMatch(actual, expected, p5) {
174174
// Define significance thresholds
175175
const MIN_CLUSTER_SIZE = 4; // Minimum pixels in a significant cluster
176176
const MAX_TOTAL_DIFF_PIXELS = 40; // Maximum total different pixels
177-
const MAX_LINE_SHIFT_PIXELS = 100;
177+
const MAX_LINE_SHIFT_PIXELS = 200;
178178

179179
// Determine if the differences are significant
180180
const lineShiftClusters = clusterSizes.filter(c => c.isLineShift && c.size > MIN_CLUSTER_SIZE);
@@ -290,7 +290,6 @@ function findClusterSize(pixels, startX, startY, width, height, radius, visited)
290290
// If most pixels (>80%) in the cluster have ≤2 neighbors, it's likely a line shift
291291
isLineShift = linelikePixels / clusterPixels.length > 0.8;
292292
}
293-
294293
return {
295294
size,
296295
pixels: clusterPixels,

0 commit comments

Comments
 (0)