aboutsummaryrefslogtreecommitdiff
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.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js
index 976313b5f6..9f27723a04 100644
--- a/test/parallel/test-vm-function-declaration.js
+++ b/test/parallel/test-vm-function-declaration.js
@@ -3,10 +3,10 @@ require('../common');
const assert = require('assert');
const vm = require('vm');
-var o = vm.createContext({ console: console });
+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');