@@ -7,7 +7,7 @@ import * as path from 'path';
77import { getGlobalVariable , setGlobalVariable } from './e2e/utils/env' ;
88import { gitClean } from './e2e/utils/git' ;
99import { createNpmRegistry } from './e2e/utils/registry' ;
10- import { AddressInfo , createServer , Server } from 'net' ;
10+ import { AddressInfo , createServer } from 'net' ;
1111import { launchTestProcess } from './e2e/utils/process' ;
1212import { join } from 'path' ;
1313
@@ -123,8 +123,6 @@ setGlobalVariable('argv', argv);
123123setGlobalVariable ( 'ci' , process . env [ 'CI' ] ?. toLowerCase ( ) === 'true' || process . env [ 'CI' ] === '1' ) ;
124124setGlobalVariable ( 'package-manager' , argv . yarn ? 'yarn' : 'npm' ) ;
125125
126- let lastTestRun : string | null = null ;
127-
128126Promise . all ( [ findFreePort ( ) , findFreePort ( ) ] )
129127 . then ( async ( [ httpPort , httpsPort ] ) => {
130128 setGlobalVariable ( 'package-registry' , 'http://localhost:' + httpPort ) ;
@@ -142,7 +140,6 @@ Promise.all([findFreePort(), findFreePort()])
142140 console . log ( colors . green ( 'Done.' ) ) ;
143141 } catch ( err ) {
144142 console . log ( '\n' ) ;
145- console . error ( colors . red ( `Test "${ lastTestRun } " failed...` ) ) ;
146143 console . error ( colors . red ( err . message ) ) ;
147144 console . error ( colors . red ( err . stack ) ) ;
148145
@@ -187,7 +184,11 @@ async function runSteps(
187184 // Run the test function with the current file on the logStack.
188185 logStack . push ( lastLogger ( ) . createChild ( absoluteName ) ) ;
189186 try {
190- await run ( ( lastTestRun = absoluteName ) ) ;
187+ await run ( absoluteName ) ;
188+ } catch ( e ) {
189+ console . log ( '\n' ) ;
190+ console . error ( colors . red ( `Step "${ absoluteName } " failed...` ) ) ;
191+ throw e ;
191192 } finally {
192193 logStack . pop ( ) ;
193194 }
0 commit comments