Skip to content

Commit 9a0f156

Browse files
santigimenoMyles Borins
authored and
Myles Borins
committed
test: fix domain-top-level-error-handler-throw
Check the stderr output in the `close` event as it's not guaranteed to be fully available when the `exit` event is fired. PR: #4364 PR-URL: #4364 Reviewed-By: Julien Gilli <[email protected]>
1 parent 6bc1b1c commit 9a0f156

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/parallel/test-domain-top-level-error-handler-throw.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ if (process.argv[2] === 'child') {
3636
stderrOutput += data.toString();
3737
});
3838

39-
child.on('exit', function onChildExited(exitCode, signal) {
39+
child.on('close', function onChildClosed() {
4040
assert(stderrOutput.indexOf(domainErrHandlerExMessage) !== -1);
4141
assert(stderrOutput.indexOf(internalExMessage) === -1);
42+
});
4243

44+
child.on('exit', function onChildExited(exitCode, signal) {
4345
var expectedExitCode = 7;
4446
var expectedSignal = null;
4547

0 commit comments

Comments
 (0)