File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,22 @@ for (let mockName of allMockList) {
126126
127127 const img0 = PNG . sync . read ( fs . readFileSync ( base ) ) ;
128128 const img1 = PNG . sync . read ( fs . readFileSync ( test ) ) ;
129+ let dimensionMismatch = false ;
129130 for ( const key of [ 'height' , 'width' ] ) {
130131 const length0 = img0 [ key ] ;
131132 const length1 = img1 [ key ] ;
132133 if ( length0 !== length1 ) {
133134 console . error ( key + 's do not match: ' + length0 + ' vs ' + length1 ) ;
134- failed . add ( mockName ) ;
135+ dimensionMismatch = true ;
135136 }
136137 }
137138
139+ if ( dimensionMismatch ) {
140+ fs . copyFileSync ( test , diff ) ;
141+ failed . add ( mockName ) ;
142+ continue ;
143+ }
144+
138145 if ( virtualWebgl ) {
139146 if ( flakyListVirtualWebgl . has ( mockName ) ) threshold = 0.7 ;
140147 else threshold = Math . max ( 0.4 , threshold ) ;
You can’t perform that action at this time.
0 commit comments