From 3f2b125ca1f85d7ab2a0ec48f18e24c58d666a4e Mon Sep 17 00:00:00 2001 From: "Song, Bintao Garfield" Date: Sun, 16 Jul 2017 15:08:33 +0800 Subject: [PATCH 1/2] replace string concatenation with template literals replace the string concation at test/addons-napi/test_reference/test.js --- test/addons-napi/test_reference/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/addons-napi/test_reference/test.js b/test/addons-napi/test_reference/test.js index aaf5531f39e1f3..14932a74ca70b0 100644 --- a/test/addons-napi/test_reference/test.js +++ b/test/addons-napi/test_reference/test.js @@ -22,7 +22,7 @@ function runTests(i, title, tests) { try { tests[i](); } catch (e) { - console.error('Test failed: ' + title); + console.error(`Test failed: ${title}`); throw e; } setImmediate(() => { From 785b0d93a2b2385ed52bff5179a91ff72126437a Mon Sep 17 00:00:00 2001 From: "Song, Bintao Garfield" Date: Sun, 16 Jul 2017 16:12:43 +0800 Subject: [PATCH 2/2] test: replace string concatenation replace string-concation in test/async-hooks/test-signalwrap.js with template literals --- test/async-hooks/test-signalwrap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/async-hooks/test-signalwrap.js b/test/async-hooks/test-signalwrap.js index c2e664af9a567e..ff7d08bc1207b0 100644 --- a/test/async-hooks/test-signalwrap.js +++ b/test/async-hooks/test-signalwrap.js @@ -22,7 +22,7 @@ assert.strictEqual(typeof signal1.triggerAsyncId, 'number'); checkInvocations(signal1, { init: 1 }, 'when SIGUSR2 handler is set up'); let count = 0; -exec('kill -USR2 ' + process.pid); +exec(`kill -USR2 ${process.pid}`); let signal2; @@ -36,7 +36,7 @@ function onsigusr2() { ' signal1: when first SIGUSR2 handler is called for the first time'); // trigger same signal handler again - exec('kill -USR2 ' + process.pid); + exec(`kill -USR2 ${process.pid}`); } else { // second invocation checkInvocations( @@ -61,7 +61,7 @@ function onsigusr2() { signal2, { init: 1 }, 'signal2: when second SIGUSR2 handler is setup'); - exec('kill -USR2 ' + process.pid); + exec(`kill -USR2 ${process.pid}`); } }