Permalink
Browse files

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 <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 jasnell committed Oct 15, 2016
1 parent 0591362 commit 68157bd8b90264c9efe5c72376ef73ac11b91a82
@@ -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);
@@ -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();`
@@ -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) {
@@ -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);

0 comments on commit 68157bd

Please sign in to comment.