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 6a4cc43

Browse filesBrowse files
arsenalzpcodebytere
authored andcommitted
test: replace var with const
Replace `var` with `const` in vm context for test-util-inspect.js. PR-URL: #36069 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 841a281 commit 6a4cc43
Copy full SHA for 6a4cc43

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-util-inspect.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-util-inspect.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,9 +583,9 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
583583
{
584584
let obj = vm.runInNewContext('(function(){return {}})()', {});
585585
assert.strictEqual(util.inspect(obj), '{}');
586-
obj = vm.runInNewContext('var m=new Map();m.set(1,2);m', {});
586+
obj = vm.runInNewContext('const m=new Map();m.set(1,2);m', {});
587587
assert.strictEqual(util.inspect(obj), 'Map(1) { 1 => 2 }');
588-
obj = vm.runInNewContext('var s=new Set();s.add(1);s.add(2);s', {});
588+
obj = vm.runInNewContext('const s=new Set();s.add(1);s.add(2);s', {});
589589
assert.strictEqual(util.inspect(obj), 'Set(2) { 1, 2 }');
590590
obj = vm.runInNewContext('fn=function(){};new Promise(fn,fn)', {});
591591
assert.strictEqual(util.inspect(obj), 'Promise { <pending> }');

0 commit comments

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