Browse Source

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>
v6
Rich Trott 8 years ago
parent
commit
150dc5c2e6
  1. 2
      test/parallel/test-debugger-pid.js
  2. 2
      test/parallel/test-tick-processor-cpp-core.js
  3. 2
      test/parallel/test-vm-cached-data.js
  4. 2
      test/sequential/test-child-process-execsync.js

2
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);

2
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();`

2
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) {

2
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);

Loading…
Cancel
Save