Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit dd9aefd

Browse filesBrowse files
cjihrigItalo A. Casas
authored andcommitted
test: use const for all require() calls
PR-URL: #10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 5250b33 commit dd9aefd
Copy full SHA for dd9aefd

File tree

Expand file treeCollapse file tree

603 files changed

+1567
-1546
lines changed
Open diff view settings
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

603 files changed

+1567
-1546
lines changed
Open diff view settings
Collapse file

‎test/addons/async-hello-world/test.js‎

Copy file name to clipboardExpand all lines: test/addons/async-hello-world/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
const common = require('../../common');
3-
var assert = require('assert');
3+
const assert = require('assert');
44
const binding = require(`./build/${common.buildType}/binding`);
55

66
binding(5, common.mustCall(function(err, val) {
Collapse file
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
const common = require('../../common');
3-
var assert = require('assert');
3+
const assert = require('assert');
44
const binding = require(`./build/${common.buildType}/binding`);
55
assert.strictEqual(binding(), 'world');
66
console.log('binding.hello() =', binding());
Collapse file

‎test/addons/hello-world/test.js‎

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
const common = require('../../common');
3-
var assert = require('assert');
3+
const assert = require('assert');
44
const binding = require(`./build/${common.buildType}/binding`);
55
assert.strictEqual(binding.hello(), 'world');
66
console.log('binding.hello() =', binding.hello());
Collapse file

‎test/addons/load-long-path/test.js‎

Copy file name to clipboardExpand all lines: test/addons/load-long-path/test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ var contents = fs.readFileSync(addonPath);
3232
fs.writeFileSync(addonDestinationPath, contents);
3333

3434
// Attempt to load at long path destination
35-
var addon = require(addonDestinationPath);
35+
const addon = require(addonDestinationPath);
3636
assert.notEqual(addon, null);
3737
assert.strictEqual(addon.hello(), 'world');
Collapse file

‎test/addons/repl-domain-abort/test.js‎

Copy file name to clipboardExpand all lines: test/addons/repl-domain-abort/test.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
2-
var common = require('../../common');
3-
var assert = require('assert');
4-
var repl = require('repl');
5-
var stream = require('stream');
6-
var path = require('path');
2+
const common = require('../../common');
3+
const assert = require('assert');
4+
const repl = require('repl');
5+
const stream = require('stream');
6+
const path = require('path');
77
var buildType = process.config.target_defaults.default_configuration;
88
var buildPath = path.join(__dirname, 'build', buildType, 'binding');
99
// On Windows, escape backslashes in the path before passing it to REPL.
Collapse file

‎test/debugger/helper-debugger-repl.js‎

Copy file name to clipboardExpand all lines: test/debugger/helper-debugger-repl.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22
const common = require('../common');
3-
var assert = require('assert');
4-
var spawn = require('child_process').spawn;
3+
const assert = require('assert');
4+
const spawn = require('child_process').spawn;
55

66
process.env.NODE_DEBUGGER_TIMEOUT = 2000;
77
var port = common.PORT;
Collapse file

‎test/debugger/test-debugger-repl-break-in-module.js‎

Copy file name to clipboardExpand all lines: test/debugger/test-debugger-repl-break-in-module.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
require('../common');
3-
var repl = require('./helper-debugger-repl.js');
3+
const repl = require('./helper-debugger-repl.js');
44

55
repl.startDebugger('break-in-module/main.js');
66

Collapse file

‎test/debugger/test-debugger-repl-restart.js‎

Copy file name to clipboardExpand all lines: test/debugger/test-debugger-repl-restart.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22
require('../common');
3-
var repl = require('./helper-debugger-repl.js');
3+
const repl = require('./helper-debugger-repl.js');
44

55
repl.startDebugger('breakpoints.js');
66
var linesWithBreakpoint = [
Collapse file

‎test/debugger/test-debugger-repl-term.js‎

Copy file name to clipboardExpand all lines: test/debugger/test-debugger-repl-term.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require('../common');
33
process.env.NODE_FORCE_READLINE = 1;
44

5-
var repl = require('./helper-debugger-repl.js');
5+
const repl = require('./helper-debugger-repl.js');
66

77
repl.startDebugger('breakpoints.js');
88

Collapse file

‎test/debugger/test-debugger-repl-utf8.js‎

Copy file name to clipboardExpand all lines: test/debugger/test-debugger-repl-utf8.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
2-
var common = require('../common');
2+
const common = require('../common');
33
var script = common.fixturesDir + '/breakpoints_utf8.js';
44
process.env.NODE_DEBUGGER_TEST_SCRIPT = script;
55

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.