File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,12 @@ async function cypressInfo(arg) {
190190}
191191
192192const processCypressResults = ( results , errorCallback ) => {
193+ if ( typeof errorCallback !== 'function' ) {
194+ debug ( 'Typeof of error callback %s' , errorCallback )
195+ throw new Error (
196+ `Expected error callback to be a function, it was ${ typeof errorCallback } ` ,
197+ )
198+ }
193199 if ( results . failures ) {
194200 // Cypress failed without even running the tests
195201 console . error ( 'Problem running Cypress' )
@@ -310,7 +316,9 @@ module.exports = {
310316 closeServer ( )
311317 }
312318
313- processCypressResults ( results , arg . utils . build )
319+ const errorCallback = arg . utils . build . failBuild . bind ( arg . utils . build )
320+
321+ processCypressResults ( results , errorCallback )
314322 } ,
315323
316324 onPostBuild : async ( arg ) => {
You can’t perform that action at this time.
0 commit comments