File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ var mockList = getMockList(pattern);
5353var isInQueue = ( process . argv [ 3 ] === '--queue' ) ;
5454var isCI = process . env . CIRCLECI ;
5555
56+
5657if ( mockList . length === 0 ) {
5758 throw new Error ( 'No mocks found with pattern ' + pattern ) ;
5859}
@@ -252,7 +253,8 @@ function comparePixels(mockName, cb) {
252253 function onEqualityCheck ( err , isEqual ) {
253254 if ( err ) {
254255 common . touch ( imagePaths . diff ) ;
255- return console . error ( err , mockName ) ;
256+ console . error ( err ) ;
257+ return ;
256258 }
257259 if ( isEqual ) {
258260 fs . unlinkSync ( imagePaths . diff ) ;
@@ -261,7 +263,16 @@ function comparePixels(mockName, cb) {
261263 cb ( isEqual , mockName ) ;
262264 }
263265
266+ // 525 means a plotly.js error
267+ function onResponse ( response ) {
268+ if ( + response . statusCode === 525 ) {
269+ console . error ( 'plotly.js error while generating' , mockName ) ;
270+ cb ( false , mockName ) ;
271+ }
272+ }
273+
264274 request ( requestOpts )
275+ . on ( 'response' , onResponse )
265276 . pipe ( saveImageStream )
266277 . on ( 'close' , checkImage ) ;
267278}
You can’t perform that action at this time.
0 commit comments