Skip to content

Commit 61214ee

Browse files
committed
disable image comparison in CI
1 parent 2592ff9 commit 61214ee

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/plot.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ for (const [name, plot] of Object.entries(plots)) {
4141
// until we have a way to normalize the output, we need to ignore the
4242
// generated image data during comparison. But you can still review the
4343
// generated output visually and hopefully it’ll be correct.
44-
const equal =
45-
process.env.CI === "true" ? stripLargeImageData(actual) === stripLargeImageData(expected) : actual === expected;
44+
const equal = process.env.CI === "true" ? stripImageData(actual) === stripImageData(expected) : actual === expected;
4645

4746
if (equal) {
4847
if (process.env.CI !== "true") {
@@ -109,9 +108,9 @@ function reindexClip(root) {
109108
}
110109
}
111110

112-
function stripLargeImageData(string) {
111+
function stripImageData(string) {
113112
return string.replace(
114-
/data:image\/png;base64,[^"]{10000,}/g,
113+
/data:image\/png;base64,[^"]+/g,
115114
"data:image/svg+xml,%3Csvg width='15' height='15' viewBox='0 0 20 20' style='background-color: white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h10v10H0zm10 10h10v10H10z' fill='%23f4f4f4' fill-rule='evenodd'/%3E%3C/svg%3E"
116115
);
117116
}

0 commit comments

Comments
 (0)