File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,15 @@ const {
7
7
ArrayPrototypeSlice,
8
8
ArrayPrototypeSort,
9
9
Promise,
10
+ PromiseAll,
10
11
SafeSet,
11
12
} = primordials ;
12
13
const {
13
14
prepareMainThreadExecution,
14
15
} = require ( 'internal/bootstrap/pre_execution' ) ;
15
16
const { spawn } = require ( 'child_process' ) ;
16
17
const { readdirSync, statSync } = require ( 'fs' ) ;
18
+ const { finished } = require ( 'internal/streams/end-of-stream' ) ;
17
19
const console = require ( 'internal/console/global' ) ;
18
20
const {
19
21
codes : {
@@ -126,9 +128,10 @@ function runTestFile(path) {
126
128
stderr += chunk ;
127
129
} ) ;
128
130
129
- child . once ( 'exit' , ( code , signal ) => {
131
+ child . once ( 'exit' , async ( code , signal ) => {
130
132
if ( code !== 0 || signal !== null ) {
131
133
if ( ! err ) {
134
+ await PromiseAll ( [ finished ( child . stderr ) , finished ( child . stdout ) ] ) ;
132
135
err = new ERR_TEST_FAILURE ( 'test failed' , kSubtestsFailed ) ;
133
136
err . exitCode = code ;
134
137
err . signal = signal ;
You can’t perform that action at this time.
0 commit comments