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/parallel/test-repl-persistent-history.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/parallel/test-repl-persistent-history.js')
-rw-r--r-- | test/parallel/test-repl-persistent-history.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/parallel/test-repl-persistent-history.js b/test/parallel/test-repl-persistent-history.js index 0ce25a4dd5..f2c760cb38 100644 --- a/test/parallel/test-repl-persistent-history.js +++ b/test/parallel/test-repl-persistent-history.js @@ -35,7 +35,7 @@ class ActionStream extends stream.Stream { if (typeof action === 'object') { this.emit('keypress', '', action); } else { - this.emit('data', action + '\n'); + this.emit('data', `${action}\n`); } setImmediate(doAction); }; @@ -117,19 +117,19 @@ const tests = [ { env: { NODE_REPL_HISTORY: historyPath }, test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + expected: [prompt, `${prompt}'you look fabulous today'`, prompt] }, { env: { NODE_REPL_HISTORY: historyPath, NODE_REPL_HISTORY_FILE: oldHistoryPath }, test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + expected: [prompt, `${prompt}'you look fabulous today'`, prompt] }, { env: { NODE_REPL_HISTORY: historyPath, NODE_REPL_HISTORY_FILE: '' }, test: [UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + expected: [prompt, `${prompt}'you look fabulous today'`, prompt] }, { env: {}, @@ -139,27 +139,27 @@ const tests = [ { env: { NODE_REPL_HISTORY_FILE: oldHistoryPath }, test: [UP, CLEAR, '\'42\'', ENTER], - expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt, '\'', + expected: [prompt, convertMsg, prompt, `${prompt}'=^.^='`, prompt, '\'', '4', '2', '\'', '\'42\'\n', prompt, prompt], clean: false }, { // Requires the above testcase env: {}, test: [UP, UP, ENTER], - expected: [prompt, prompt + '\'42\'', prompt + '\'=^.^=\'', '\'=^.^=\'\n', + expected: [prompt, `${prompt}'42'`, `${prompt}'=^.^='`, '\'=^.^=\'\n', prompt] }, { env: { NODE_REPL_HISTORY: historyPath, NODE_REPL_HISTORY_SIZE: 1 }, test: [UP, UP, CLEAR], - expected: [prompt, prompt + '\'you look fabulous today\'', prompt] + expected: [prompt, `${prompt}'you look fabulous today'`, prompt] }, { env: { NODE_REPL_HISTORY_FILE: oldHistoryPath, NODE_REPL_HISTORY_SIZE: 1 }, test: [UP, UP, UP, CLEAR], - expected: [prompt, convertMsg, prompt, prompt + '\'=^.^=\'', prompt] + expected: [prompt, convertMsg, prompt, `${prompt}'=^.^='`, prompt] }, { env: { NODE_REPL_HISTORY: historyPathFail, |