diff options
author | sreepurnajasti <sreepurna.jasti@gmail.com> | 2017-12-28 15:17:56 +0530 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2018-02-12 19:28:29 -0500 |
commit | 2c554a9d2be93c85fe1e02d0043aaffa59109477 (patch) | |
tree | 21be7b1bce9edb84c13854a3ee7326c013103757 | |
parent | 3c3a631643cc21bfe9dc89bcad1c63faf7cd05af (diff) | |
download | node-new-2c554a9d2be93c85fe1e02d0043aaffa59109477.tar.gz |
test: improve to use template string
PR-URL: https://github.com/nodejs/node/pull/17895
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
-rw-r--r-- | test/parallel/test-child-process-fork-net2.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/parallel/test-child-process-fork-net2.js b/test/parallel/test-child-process-fork-net2.js index 41ba49c24c..4729fe0573 100644 --- a/test/parallel/test-child-process-fork-net2.js +++ b/test/parallel/test-child-process-fork-net2.js @@ -12,7 +12,7 @@ if (process.argv[2] === 'child') { process.on('message', function(m, socket) { if (!socket) return; - console.error('[%d] got socket', id, m); + console.error(`[${id}] got socket ${m}`); // will call .end('end') or .write('write'); socket[m](m); @@ -20,11 +20,11 @@ if (process.argv[2] === 'child') { socket.resume(); socket.on('data', function() { - console.error('[%d] socket.data', id, m); + console.error(`[${id}] socket.data ${m}`); }); socket.on('end', function() { - console.error('[%d] socket.end', id, m); + console.error(`[${id}] socket.end ${m}`); }); // store the unfinished socket @@ -33,27 +33,27 @@ if (process.argv[2] === 'child') { } socket.on('close', function(had_error) { - console.error('[%d] socket.close', id, had_error, m); + console.error(`[${id}] socket.close ${had_error} ${m}`); }); socket.on('finish', function() { - console.error('[%d] socket finished', id, m); + console.error(`[${id}] socket finished ${m}`); }); }); process.on('message', function(m) { if (m !== 'close') return; - console.error('[%d] got close message', id); + console.error(`[${id}] got close message`); needEnd.forEach(function(endMe, i) { - console.error('[%d] ending %d/%d', id, i, needEnd.length); + console.error(`[${id}] ending ${i}/${needEnd.length}`); endMe.end('end'); }); }); process.on('disconnect', function() { - console.error('[%d] process disconnect, ending', id); + console.error(`[${id}] process disconnect, ending`); needEnd.forEach(function(endMe, i) { - console.error('[%d] ending %d/%d', id, i, needEnd.length); + console.error(`[${id}] ending ${i}/${needEnd.length}`); endMe.end('end'); }); }); @@ -86,7 +86,7 @@ if (process.argv[2] === 'child') { connected += 1; socket.once('close', function() { - console.log('[m] socket closed, total %d', ++closed); + console.log(`[m] socket closed, total ${++closed}`); }); if (connected === count) { |