var match = execArgv[i].match(/^(--debug|--debug-(brk|port))(=\d+)?$/);
if (match) {
- let debugPort = process.debugPort + debugPortOffset;
+ const debugPort = process.debugPort + debugPortOffset;
++debugPortOffset;
execArgv[i] = match[1] + '=' + debugPort;
}
var nextRecurseTimes = recurseTimes === null ? null : recurseTimes - 1;
var vals = mirror.preview();
var output = [];
- for (let o of vals) {
+ for (const o of vals) {
output.push(formatValue(ctx, o, nextRecurseTimes));
}
return output;
// Run from closed net server above.
function checkTLS() {
- let options = {
+ const options = {
key: fs.readFileSync(common.fixturesDir + '/keys/ec-key.pem'),
cert: fs.readFileSync(common.fixturesDir + '/keys/ec-cert.pem')
};
- let server = tls.createServer(options, noop).listen(common.PORT, function() {
- tls.connect(common.PORT, { rejectUnauthorized: false }, function() {
- this.destroy();
- server.close();
+ const server = tls.createServer(options, noop)
+ .listen(common.PORT, function() {
+ tls.connect(common.PORT, { rejectUnauthorized: false }, function() {
+ this.destroy();
+ server.close();
+ });
});
- });
}
zlib.createGzip();
for (let i = 0; i < 100; i++) {
new Buffer(0);
- let ui = new Uint8Array(65);
+ const ui = new Uint8Array(65);
assert.ok(testUint8Array(ui), 'Uint8Array is not zero-filled');
}
server.close();
});
server.listen(common.PORT, '127.0.0.1', function() {
- let req = http.request({
+ const req = http.request({
method: 'GET',
host: '127.0.0.1',
port: common.PORT,
setImmediate(runTests);
});
}).listen(common.PORT, function() {
- let c = new tls.TLSSocket(socket, socketOptions);
+ const c = new tls.TLSSocket(socket, socketOptions);
c.connect(common.PORT, function() {
c.end(sent);
});
var mirror = Debug.MakeMirror(map.entries(), true);
var vals = mirror.preview();
var valsOutput = [];
-for (let o of vals) {
+for (const o of vals) {
valsOutput.push(o);
}
const count = 12;
if (process.argv[2] === 'child') {
- let sockets = [];
+ const sockets = [];
process.on('message', function(m, socket) {
function sendClosed(id) {
});
const server = net.createServer();
- let sockets = [];
+ const sockets = [];
let sent = 0;
server.on('connection', function(socket) {