Skip to content
Permalink
Browse files

test: change var to let in test-trace-events

PR-URL: #30406
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
jonchurch authored and MylesBorins committed Nov 12, 2019
1 parent 0c4bb4a commit d077550c4445f761c8a852f22a8a576f97322af5
@@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
@@ -18,7 +18,7 @@ const path = require('path');
const enable = `require("trace_events").createTracing(
{ categories: ["node.async_hooks"] }).enable();`;
const code =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const tmpdir = require('../common/tmpdir');
const filename = path.join(tmpdir.path, 'node_trace.1.log');
@@ -16,7 +16,7 @@ const fs = require('fs');
const path = require('path');

const code =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';
const worker =
`const { Worker } = require('worker_threads');
const worker = new Worker('${code}',
@@ -7,7 +7,7 @@ const path = require('path');
const util = require('util');

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
@@ -9,7 +9,7 @@ const path = require('path');
tmpdir.refresh();

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const proc = cp.spawn(process.execPath, [
'--trace-events-enabled',
@@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1);' +
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1);' +
'process.title = "foo"';

const tmpdir = require('../common/tmpdir');
@@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
@@ -6,7 +6,7 @@ const fs = require('fs');
const path = require('path');

const CODE =
'setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1)';
'setTimeout(() => { for (let i = 0; i < 100000; i++) { "test" + i } }, 1)';

const tmpdir = require('../common/tmpdir');
tmpdir.refresh();

0 comments on commit d077550

Please sign in to comment.
You can’t perform that action at this time.