From eb19acb84e5cb2c6ef81df67c7699c4452d096dd Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Sun, 26 Mar 2017 11:16:27 +0200 Subject: [PATCH] test: fix misleading comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment is outdated, function declarations have nothing to do with defineProperties. PR-URL: https://github.com/nodejs/node/pull/12048 Reviewed-By: Colin Ihrig Reviewed-By: Gibson Fahnestock Reviewed-By: Michaƫl Zasso Reviewed-By: Yuta Hiroto Reviewed-By: James M Snell --- test/parallel/test-vm-function-declaration.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js index 668b29885c44cf..c2aff80f02b524 100644 --- a/test/parallel/test-vm-function-declaration.js +++ b/test/parallel/test-vm-function-declaration.js @@ -5,11 +5,9 @@ const assert = require('assert'); const vm = require('vm'); const o = vm.createContext({ console: console }); -// This triggers the setter callback in node_contextify.cc +// Function declaration and expression should both be copied to the +// sandboxed context. let code = 'var a = function() {};\n'; - -// but this does not, since function decls are defineProperties, -// not simple sets. code += 'function b(){}\n'; // Grab the global b function as the completion value, to ensure that