summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-history-perm.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-07-21 13:17:07 -0400
committercjihrig <cjihrig@gmail.com>2016-08-08 11:03:18 -0400
commit2d4a521d5868457d5d5675a824b3c3a5cfaf0985 (patch)
tree906bb2ea7ed101248b062be0e6bdc8cb48790127 /test/parallel/test-repl-history-perm.js
parentf18b1c91b8be9c668d6f8a4b71d9f3d81628f429 (diff)
downloadandroid-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-history-perm.js')
-rw-r--r--test/parallel/test-repl-history-perm.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-repl-history-perm.js b/test/parallel/test-repl-history-perm.js
index c7d2852539..4a374cb0ab 100644
--- a/test/parallel/test-repl-history-perm.js
+++ b/test/parallel/test-repl-history-perm.js
@@ -35,6 +35,10 @@ const replHistoryPath = path.join(common.tmpDir, '.node_repl_history');
const checkResults = common.mustCall(function(err, r) {
if (err)
throw err;
+
+ // The REPL registers 'module' and 'require' globals
+ common.allowGlobals(r.context.module, r.context.require);
+
r.input.end();
const stat = fs.statSync(replHistoryPath);
assert.strictEqual(