Skip to content

Commit 36f0203

Browse files
committed
fixup! test: remove unnecessary process.exit calls from test files
1 parent 5c35204 commit 36f0203

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

test/parallel/test-inspector-port-zero-cluster.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function serialFork() {
3535

3636
if (cluster.isPrimary) {
3737
Promise.all([serialFork(), serialFork(), serialFork()])
38-
.then(common.mustCall((ports) => {
38+
.then((ports) => {
3939
ports.splice(0, 0, process.debugPort);
4040
// 4 = [primary, worker1, worker2, worker3].length()
4141
assert.strictEqual(ports.length, 4);
@@ -44,10 +44,8 @@ if (cluster.isPrimary) {
4444
assert.strictEqual(ports[0] === 65535 ? 1024 : ports[0] + 1, ports[1]);
4545
assert.strictEqual(ports[1] === 65535 ? 1024 : ports[1] + 1, ports[2]);
4646
assert.strictEqual(ports[2] === 65535 ? 1024 : ports[2] + 1, ports[3]);
47-
}))
48-
.catch(
49-
(err) => {
50-
console.error(err);
51-
process.exit(1);
52-
});
47+
})
48+
.then(common.mustCall());
49+
} else {
50+
process.disconnect();
5351
}

0 commit comments

Comments
 (0)