diff options
author | cjihrig <cjihrig@gmail.com> | 2016-07-21 13:17:07 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-08-08 11:03:18 -0400 |
commit | 2d4a521d5868457d5d5675a824b3c3a5cfaf0985 (patch) | |
tree | 906bb2ea7ed101248b062be0e6bdc8cb48790127 /test/parallel/test-repl-use-global.js | |
parent | f18b1c91b8be9c668d6f8a4b71d9f3d81628f429 (diff) | |
download | android-node-v8-2d4a521d5868457d5d5675a824b3c3a5cfaf0985.tar.gz android-node-v8-2d4a521d5868457d5d5675a824b3c3a5cfaf0985.tar.bz2 android-node-v8-2d4a521d5868457d5d5675a824b3c3a5cfaf0985.zip |
repl: don't override all internal repl defaults
The createInternalRepl() module accepts an options object as an
argument. However, if one is provided, it overrides all of the
default options. This commit applies the options object to the
defaults, only changing the values that are explicitly set.
PR-URL: https://github.com/nodejs/node/pull/7826
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-repl-use-global.js')
-rw-r--r-- | test/parallel/test-repl-use-global.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-repl-use-global.js b/test/parallel/test-repl-use-global.js index 86c646cc76..79e13cd819 100644 --- a/test/parallel/test-repl-use-global.js +++ b/test/parallel/test-repl-use-global.js @@ -7,8 +7,6 @@ const stream = require('stream'); const repl = require('internal/repl'); const assert = require('assert'); -common.globalCheck = false; - // Array of [useGlobal, expectedResult] pairs const globalTestCases = [ [false, 'undefined'], @@ -20,6 +18,9 @@ const globalTest = (useGlobal, cb, output) => (err, repl) => { if (err) return cb(err); + // The REPL registers 'module' and 'require' globals + common.allowGlobals(repl.context.module, repl.context.require); + let str = ''; output.on('data', (data) => (str += data)); global.lunch = 'tacos'; |