We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 584756e commit 7a9e5aaCopy full SHA for 7a9e5aa
1 file changed
test/image/compare_pixels_test.js
@@ -126,15 +126,22 @@ for (let mockName of allMockList) {
126
127
const img0 = PNG.sync.read(fs.readFileSync(base));
128
const img1 = PNG.sync.read(fs.readFileSync(test));
129
+ let dimensionMismatch = false;
130
for (const key of ['height', 'width']) {
131
const length0 = img0[key];
132
const length1 = img1[key];
133
if (length0 !== length1) {
134
console.error(key + 's do not match: ' + length0 + ' vs ' + length1);
- failed.add(mockName);
135
+ dimensionMismatch = true;
136
}
137
138
139
+ if (dimensionMismatch) {
140
+ fs.copyFileSync(test, diff);
141
+ failed.add(mockName);
142
+ continue;
143
+ }
144
+
145
if (virtualWebgl) {
146
if (flakyListVirtualWebgl.has(mockName)) threshold = 0.7;
147
else threshold = Math.max(0.4, threshold);
0 commit comments