summaryrefslogtreecommitdiff
path: root/test/parallel/test-repl-history-perm.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-repl-history-perm.js')
-rw-r--r--test/parallel/test-repl-history-perm.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/parallel/test-repl-history-perm.js b/test/parallel/test-repl-history-perm.js
index 03ce1435d9..3db2a009eb 100644
--- a/test/parallel/test-repl-history-perm.js
+++ b/test/parallel/test-repl-history-perm.js
@@ -38,12 +38,15 @@ const replHistoryPath = path.join(tmpdir.path, '.node_repl_history');
const checkResults = common.mustCall(function(err, r) {
assert.ifError(err);
- r.input.end();
const stat = fs.statSync(replHistoryPath);
const fileMode = stat.mode & 0o777;
assert.strictEqual(
fileMode, 0o600,
`REPL history file should be mode 0600 but was 0${fileMode.toString(8)}`);
+
+ // Close the REPL
+ r.input.emit('keypress', '', { ctrl: true, name: 'd' });
+ r.input.end();
});
repl.createInternalRepl(