diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-04-28 04:06:42 +0300 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-05-05 17:39:05 +0300 |
commit | 8b76c3e60c7b5c274c757257580a2c0faae69097 (patch) | |
tree | a9f686995887dbeb0b5c5b23c5f3188987c99b2e /test/sequential/test-child-process-execsync.js | |
parent | 6bcf65d4a788a73b3c3f27d75796609f948f7885 (diff) | |
download | android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.gz android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.tar.bz2 android-node-v8-8b76c3e60c7b5c274c757257580a2c0faae69097.zip |
test: reduce string concatenations
PR-URL: https://github.com/nodejs/node/pull/12735
Refs: https://github.com/nodejs/node/pull/12455
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'test/sequential/test-child-process-execsync.js')
-rw-r--r-- | test/sequential/test-child-process-execsync.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js index 4c8dd0d0a4..4dc11253c9 100644 --- a/test/sequential/test-child-process-execsync.js +++ b/test/sequential/test-child-process-execsync.js @@ -66,7 +66,7 @@ assert.throws(function() { }, /Command failed: iamabadcommand/); const msg = 'foobar'; -const msgBuf = Buffer.from(msg + '\n'); +const msgBuf = Buffer.from(`${msg}\n`); // console.log ends every line with just '\n', even on Windows. @@ -79,7 +79,7 @@ assert.deepStrictEqual(ret, msgBuf, 'execSync result buffer should match'); ret = execSync(cmd, { encoding: 'utf8' }); -assert.strictEqual(ret, msg + '\n', 'execSync encoding result should match'); +assert.strictEqual(ret, `${msg}\n`, 'execSync encoding result should match'); const args = [ '-e', @@ -91,7 +91,7 @@ assert.deepStrictEqual(ret, msgBuf); ret = execFileSync(process.execPath, args, { encoding: 'utf8' }); -assert.strictEqual(ret, msg + '\n', +assert.strictEqual(ret, `${msg}\n`, 'execFileSync encoding result should match'); // Verify that the cwd option works - GH #7824 |