Skip to content

Commit 68157bd

Browse files
Trottjasnell
authored andcommitted
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 0591362 commit 68157bd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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)