Skip to content

Commit dffafde

Browse files
committed
test: fix test-process-exec-argv flakiness
Wait for the `close` event before parsing the child stdout output. Fixes: #6480 PR-URL: #6575 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 0e2b250 commit dffafde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/parallel/test-process-exec-argv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if (process.argv[2] === 'child') {
1515
out += chunk;
1616
});
1717

18-
child.on('exit', function() {
18+
child.on('close', function() {
1919
assert.deepStrictEqual(JSON.parse(out), execArgv);
2020
});
2121
}

0 commit comments

Comments
 (0)