Skip to content

Commit

Permalink
test: remove unneeded escaping in template strings
Browse files Browse the repository at this point in the history
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: #9112
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
Trott authored and Myles Borins committed Nov 11, 2016
1 parent 127ed73 commit 39a53a0
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/parallel/test-debug-port-numbers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-debugger-pid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-tick-processor-cpp-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();`
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-vm-cached-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-child-process-execsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 39a53a0

Please sign in to comment.