Skip to content

Commit 39a53a0

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
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: #9112 Reviewed-By: Teddy Katz <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
1 parent 127ed73 commit 39a53a0

5 files changed

+5
-5
lines changed

test/parallel/test-debug-port-numbers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function kill(child) {
5353
process.on('exit', function() {
5454
for (const child of children) {
5555
const port = child.test.port;
56-
const one = RegExp(`Debugger listening on (\\[::\\]|0\.0\.0\.0):${port}`);
56+
const one = RegExp(`Debugger listening on (\\[::\\]|0.0.0.0):${port}`);
5757
const two = RegExp(`connecting to 127.0.0.1:${port}`);
5858
assert(one.test(child.test.stdout));
5959
assert(two.test(child.test.stdout));

test/parallel/test-debugger-pid.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interfacer.on('line', function(line) {
4343
}
4444
} else {
4545
line = line.replace(/^(debug> *)+/, '');
46-
expected = `(node:${pid}) Target process: 655555 doesn\'t exist.`;
46+
expected = `(node:${pid}) Target process: 655555 doesn't exist.`;
4747
}
4848

4949
assert.strictEqual(expected, line);

test/parallel/test-tick-processor-cpp-core.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const base = require('./tick-processor-base.js');
2020
base.runTest({
2121
pattern: /RunInDebugContext/,
2222
code: `function f() {
23-
require(\'vm\').runInDebugContext(\'Debug\');
23+
require('vm').runInDebugContext('Debug');
2424
setImmediate(function() { f(); });
2525
};
2626
f();`

test/parallel/test-vm-cached-data.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const spawnSync = require('child_process').spawnSync;
66
const Buffer = require('buffer').Buffer;
77

88
function getSource(tag) {
9-
return `(function ${tag}() { return \'${tag}\'; })`;
9+
return `(function ${tag}() { return '${tag}'; })`;
1010
}
1111

1212
function produce(source, count) {

test/sequential/test-child-process-execsync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ var msgBuf = Buffer.from(msg + '\n');
4848

4949
// console.log ends every line with just '\n', even on Windows.
5050

51-
cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`;
51+
cmd = `"${process.execPath}" -e "console.log('${msg}');"`;
5252

5353
ret = execSync(cmd);
5454

0 commit comments

Comments
 (0)