@@ -7,7 +7,7 @@ import * as path from 'path';
7
7
import { getGlobalVariable , setGlobalVariable } from './e2e/utils/env' ;
8
8
import { gitClean } from './e2e/utils/git' ;
9
9
import { createNpmRegistry } from './e2e/utils/registry' ;
10
- import { AddressInfo , createServer , Server } from 'net' ;
10
+ import { AddressInfo , createServer } from 'net' ;
11
11
import { launchTestProcess } from './e2e/utils/process' ;
12
12
import { join } from 'path' ;
13
13
@@ -123,8 +123,6 @@ setGlobalVariable('argv', argv);
123
123
setGlobalVariable ( 'ci' , process . env [ 'CI' ] ?. toLowerCase ( ) === 'true' || process . env [ 'CI' ] === '1' ) ;
124
124
setGlobalVariable ( 'package-manager' , argv . yarn ? 'yarn' : 'npm' ) ;
125
125
126
- let lastTestRun : string | null = null ;
127
-
128
126
Promise . all ( [ findFreePort ( ) , findFreePort ( ) ] )
129
127
. then ( async ( [ httpPort , httpsPort ] ) => {
130
128
setGlobalVariable ( 'package-registry' , 'http://localhost:' + httpPort ) ;
@@ -142,7 +140,6 @@ Promise.all([findFreePort(), findFreePort()])
142
140
console . log ( colors . green ( 'Done.' ) ) ;
143
141
} catch ( err ) {
144
142
console . log ( '\n' ) ;
145
- console . error ( colors . red ( `Test "${ lastTestRun } " failed...` ) ) ;
146
143
console . error ( colors . red ( err . message ) ) ;
147
144
console . error ( colors . red ( err . stack ) ) ;
148
145
@@ -187,7 +184,11 @@ async function runSteps(
187
184
// Run the test function with the current file on the logStack.
188
185
logStack . push ( lastLogger ( ) . createChild ( absoluteName ) ) ;
189
186
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 ;
191
192
} finally {
192
193
logStack . pop ( ) ;
193
194
}
0 commit comments