test: use eslint to fix var->const/let

Manually fix issues that eslint --fix couldn't do automatically.

Backport-PR-URL: https://github.com/nodejs/node/pull/11775
PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Gibson Fahnestock authored and Myles Borins committed 2017-04-18 20:01:49 -04:00
1 parent de63698066
commit db61c952de
806 files changed
+5031 -4995

No files matched your search

+9 -9
View File
@@ -1,6 +1,6 @@
'use strict';
const common = require('../common');
var assert = require('assert');
const assert = require('assert');
if (process.argv[2] === 'child')
child();
@@ -17,27 +17,27 @@ function parent() {
}
function test(environ, shouldWrite) {
var expectErr = '';
let expectErr = '';
if (shouldWrite) {
expectErr = 'TUD %PID%: this { is: \'a\' } /debugging/\n' +
'TUD %PID%: number=1234 string=asdf obj={"foo":"bar"}\n';
}
var expectOut = 'ok\n';
const expectOut = 'ok\n';
var spawn = require('child_process').spawn;
var child = spawn(process.execPath, [__filename, 'child'], {
const spawn = require('child_process').spawn;
const child = spawn(process.execPath, [__filename, 'child'], {
env: Object.assign(process.env, { NODE_DEBUG: environ })
});
expectErr = expectErr.split('%PID%').join(child.pid);
var err = '';
let err = '';
child.stderr.setEncoding('utf8');
child.stderr.on('data', function(c) {
err += c;
});
var out = '';
let out = '';
child.stdout.setEncoding('utf8');
child.stdout.on('data', function(c) {
out += c;
@@ -53,8 +53,8 @@ function test(environ, shouldWrite) {
function child() {
var util = require('util');
var debug = util.debuglog('tud');
const util = require('util');
const debug = util.debuglog('tud');
debug('this', { is: 'a' }, /debugging/);
debug('number=%d string=%s obj=%j', 1234, 'asdf', { foo: 'bar' });
console.log('ok');