File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,11 @@ const promises = fixtures.map((fixture) =>
8080 operation : 'revert' ,
8181 } )
8282 }
83+ if ( output . exitCode !== 0 ) {
84+ const errorMessage = `[${ fixture } ] Failed to install dependencies or build a fixture`
85+ console . error ( errorMessage )
86+ throw new Error ( errorMessage )
87+ }
8388 fixtureList . delete ( fixture )
8489 } )
8590 } ) . finally ( ( ) => {
@@ -91,5 +96,22 @@ const promises = fixtures.map((fixture) =>
9196 }
9297 } ) ,
9398)
94- await Promise . allSettled ( promises )
99+ const prepareFixturesResults = await Promise . allSettled ( promises )
100+ const failedFixturesErrors = prepareFixturesResults
101+ . map ( ( promise ) => {
102+ if ( promise . status === 'rejected' ) {
103+ return promise . reason
104+ }
105+ return null
106+ } )
107+ . filter ( Boolean )
108+
109+ if ( failedFixturesErrors . length > 0 ) {
110+ console . error ( '🚨 Some fixtures failed to prepare:' )
111+ for ( const error of failedFixturesErrors ) {
112+ console . error ( error )
113+ }
114+ process . exit ( 1 )
115+ }
116+
95117console . log ( '🎉 All fixtures prepared' )
You can’t perform that action at this time.
0 commit comments