summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-10-15 12:16:42 -0700
committerMyles Borins <mborins@us.ibm.com>2016-11-11 15:46:24 -0500
commit39a53a0f29d918752d9c49c3343ae1c9100edf0a (patch)
tree3b650ed915e51498c4d5e89277d72285bb78cd64
parent127ed73f3c74d7901d39eab3f3a6ce38c92c9f3e (diff)
downloadnode-new-39a53a0f29d918752d9c49c3343ae1c9100edf0a.tar.gz
test: remove unneeded escaping in template strings
The no-useless-escape rule in ESLint did not previously flag certain unnecessary escaping in template strings. These will be flagged in ESLint 3.8.0. PR-URL: https://github.com/nodejs/node/pull/9112 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
-rw-r--r--test/parallel/test-debug-port-numbers.js2
-rw-r--r--test/parallel/test-debugger-pid.js2
-rw-r--r--test/parallel/test-tick-processor-cpp-core.js2
-rw-r--r--test/parallel/test-vm-cached-data.js2
-rw-r--r--test/sequential/test-child-process-execsync.js2
5 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-debug-port-numbers.js b/test/parallel/test-debug-port-numbers.js
index 683287340c..37ff108278 100644
--- a/test/parallel/test-debug-port-numbers.js
+++ b/test/parallel/test-debug-port-numbers.js
@@ -53,7 +53,7 @@ function kill(child) {
process.on('exit', function() {
for (const child of children) {
const port = child.test.port;
- const one = RegExp(`Debugger listening on (\\[::\\]|0\.0\.0\.0):${port}`);
+ const one = RegExp(`Debugger listening on (\\[::\\]|0.0.0.0):${port}`);
const two = RegExp(`connecting to 127.0.0.1:${port}`);
assert(one.test(child.test.stdout));
assert(two.test(child.test.stdout));
diff --git a/test/parallel/test-debugger-pid.js b/test/parallel/test-debugger-pid.js
index 1da3481107..2b81da700f 100644
--- a/test/parallel/test-debugger-pid.js
+++ b/test/parallel/test-debugger-pid.js
@@ -43,7 +43,7 @@ interfacer.on('line', function(line) {
}
} else {
line = line.replace(/^(debug> *)+/, '');
- expected = `(node:${pid}) Target process: 655555 doesn\'t exist.`;
+ expected = `(node:${pid}) Target process: 655555 doesn't exist.`;
}
assert.strictEqual(expected, line);
diff --git a/test/parallel/test-tick-processor-cpp-core.js b/test/parallel/test-tick-processor-cpp-core.js
index 2bc595e7ff..72eb25e91c 100644
--- a/test/parallel/test-tick-processor-cpp-core.js
+++ b/test/parallel/test-tick-processor-cpp-core.js
@@ -20,7 +20,7 @@ const base = require('./tick-processor-base.js');
base.runTest({
pattern: /RunInDebugContext/,
code: `function f() {
- require(\'vm\').runInDebugContext(\'Debug\');
+ require('vm').runInDebugContext('Debug');
setImmediate(function() { f(); });
};
f();`
diff --git a/test/parallel/test-vm-cached-data.js b/test/parallel/test-vm-cached-data.js
index d80c1306cb..aa2dd26ad5 100644
--- a/test/parallel/test-vm-cached-data.js
+++ b/test/parallel/test-vm-cached-data.js
@@ -6,7 +6,7 @@ const spawnSync = require('child_process').spawnSync;
const Buffer = require('buffer').Buffer;
function getSource(tag) {
- return `(function ${tag}() { return \'${tag}\'; })`;
+ return `(function ${tag}() { return '${tag}'; })`;
}
function produce(source, count) {
diff --git a/test/sequential/test-child-process-execsync.js b/test/sequential/test-child-process-execsync.js
index e16fa32a40..01d7f86884 100644
--- a/test/sequential/test-child-process-execsync.js
+++ b/test/sequential/test-child-process-execsync.js
@@ -48,7 +48,7 @@ var msgBuf = Buffer.from(msg + '\n');
// console.log ends every line with just '\n', even on Windows.
-cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`;
+cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
ret = execSync(cmd);