test: replace literal with template string · nodejs/node@f954536

@@ -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

}));

18261927

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');