Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f954536

Browse filesBrowse 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
Copy full SHA for f954536

File tree

Expand file treeCollapse file tree

1 file changed

+20
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+20
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-cluster-server-restart-rr.js
+20-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.