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 jasnell committed Oct 19, 2016
1 parent 0591362 commit 68157bd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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 68157bd

Please sign in to comment.