Browse Source

test: fix misleading comment

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 <cjihrig@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
Franziska Hinkelmann 8 years ago
committed by Myles Borins
parent
commit
eb19acb84e
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 6
      test/parallel/test-vm-function-declaration.js

6
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

Loading…
Cancel
Save