File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,7 @@ for (const [name, plot] of Object.entries(plots)) {
41
41
// until we have a way to normalize the output, we need to ignore the
42
42
// generated image data during comparison. But you can still review the
43
43
// 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 ;
46
45
47
46
if ( equal ) {
48
47
if ( process . env . CI !== "true" ) {
@@ -109,9 +108,9 @@ function reindexClip(root) {
109
108
}
110
109
}
111
110
112
- function stripLargeImageData ( string ) {
111
+ function stripImageData ( string ) {
113
112
return string . replace (
114
- / d a t a : i m a g e \/ p n g ; b a s e 6 4 , [ ^ " ] { 10000 , } / g,
113
+ / d a t a : i m a g e \/ p n g ; b a s e 6 4 , [ ^ " ] + / g,
115
114
"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"
116
115
) ;
117
116
}
You can’t perform that action at this time.
0 commit comments