Skip to content

Commit f954536

Browse files
brantphotoMylesBorins
authored andcommitted
test: replace literal with template string
PR-URL: #15957 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 5472173 commit f954536

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

test/parallel/test-cluster-server-restart-rr.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,31 @@ if (cluster.isMaster) {
1010
worker1.on('listening', common.mustCall(() => {
1111
const worker2 = cluster.fork();
1212
worker2.on('exit', (code, signal) => {
13-
assert.strictEqual(code, 0, 'worker2 did not exit normally');
14-
assert.strictEqual(signal, null, 'worker2 did not exit normally');
13+
assert.strictEqual(
14+
code,
15+
0,
16+
`worker${worker2.id} did not exit normally. Exit with code: ${code}`
17+
);
18+
assert.strictEqual(
19+
signal,
20+
null,
21+
`worker${worker2.id} did not exit normally. Exit with signal: ${signal}`
22+
);
1523
worker1.disconnect();
1624
});
1725
}));
1826

1927
worker1.on('exit', common.mustCall((code, signal) => {
20-
assert.strictEqual(code, 0, 'worker1 did not exit normally');
21-
assert.strictEqual(signal, null, 'worker1 did not exit normally');
28+
assert.strictEqual(
29+
code,
30+
0,
31+
`worker${worker1.id} did not exit normally. Exit with code: ${code}`
32+
);
33+
assert.strictEqual(
34+
signal,
35+
null,
36+
`worker${worker1.id} did not exit normally. Exit with code: ${signal}`
37+
);
2238
}));
2339
} else {
2440
const net = require('net');

0 commit comments

Comments
 (0)