test: assert.strictEqual using template literals

PR-URL: https://github.com/nodejs/node/pull/15944
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
jmcgui05 2017-10-08 19:56:22 -05:00 committed by Ruben Bridgewater
parent 17857d4fc9
commit b2e46c5b54
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -6,8 +6,16 @@ const cluster = require('cluster');
if (cluster.isMaster) {
const worker = cluster.fork();
worker.on('exit', common.mustCall((code, signal) => {
assert.strictEqual(code, 0, 'worker did not exit normally');
assert.strictEqual(signal, null, 'worker did not exit normally');
assert.strictEqual(
code,
0,
`Worker did not exit normally with code: ${code}`
);
assert.strictEqual(
signal,
null,
`Worker did not exit normally with signal: ${signal}`
);
}));
} else {
const net = require('net');