summaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-function-declaration.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-vm-function-declaration.js')
-rw-r--r--test/parallel/test-vm-function-declaration.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js
index fd41be7564..9f27723a04 100644
--- a/test/parallel/test-vm-function-declaration.js
+++ b/test/parallel/test-vm-function-declaration.js
@@ -1,12 +1,12 @@
'use strict';
require('../common');
-var assert = require('assert');
+const assert = require('assert');
-var vm = require('vm');
-var o = vm.createContext({ console: console });
+const vm = require('vm');
+const o = vm.createContext({ console: console });
// This triggers the setter callback in node_contextify.cc
-var code = 'var a = function() {};\n';
+let code = 'var a = function() {};\n';
// but this does not, since function decls are defineProperties,
// not simple sets.
@@ -16,7 +16,7 @@ code += 'function b(){}\n';
// we are getting the global function, and not some other thing
code += '(function(){return this})().b;\n';
-var res = vm.runInContext(code, o, 'test');
+const res = vm.runInContext(code, o, 'test');
assert.equal(typeof res, 'function', 'result should be function');
assert.equal(res.name, 'b', 'res should be named b');