Skip to content

Commit ab50e82

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
test: fix test-process-exec-argv flakiness
Wait for the `close` event before parsing the child stdout output. Fixes: #6480 Ref: #6575 PR-URL: #7128 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 67863f1 commit ab50e82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
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() {
19-
assert.deepEqual(JSON.parse(out), execArgv);
18+
child.on('close', function() {
19+
assert.deepStrictEqual(JSON.parse(out), execArgv);
2020
});
2121
}

0 commit comments

Comments
 (0)