Lines Matching defs:const
3 const common = require('../common');
4 const fixtures = require('../common/fixtures');
5 const stream = require('stream');
6 const REPL = require('repl');
7 const assert = require('assert');
8 const fs = require('fs');
9 const path = require('path');
10 const os = require('os');
11 const util = require('util');
15 const tmpdir = require('../common/tmpdir');
26 const _iter = data[Symbol.iterator]();
27 const doAction = () => {
28 const next = _iter.next();
36 const action = next.value;
54 const UP = { name: 'up' };
55 const DOWN = { name: 'down' };
56 const ENTER = { name: 'enter' };
57 const CLEAR = { ctrl: true, name: 'u' };
60 const historyFixturePath = fixtures.path('.node_repl_history');
61 const historyPath = path.join(tmpdir.path, '.fixture_copy_repl_history');
62 const historyPathFail = fixtures.path('nonexistent_folder', 'filename');
63 const defaultHistoryPath = path.join(tmpdir.path, '.node_repl_history');
64 const emptyHiddenHistoryPath = fixtures.path('.empty-hidden-repl-history-file');
65 const devNullHistoryPath = path.join(tmpdir.path,
68 const prompt = '> ';
69 const replDisabled = '\nPersistent history support disabled. Set the ' +
72 const homedirErr = '\nError: Could not get the home directory.\n' +
74 const replFailedRead = '\nError: Could not open history file.\n' +
77 const tests = [
139 const execSync = require('child_process').execSync;
170 const numtests = tests.length;
188 const runTestWrap = common.mustCall(runTest, numtests);
191 const opts = tests.shift();
207 const test = opts.test;
208 const expected = opts.expected;
209 const clean = opts.clean;
210 const before = opts.before;
211 const historySize = opts.env.NODE_REPL_HISTORY_SIZE;
212 const historyFile = opts.env.NODE_REPL_HISTORY;
216 const repl = REPL.start({
220 const output = chunk.toString();
258 const cleaned = clean === false ? false : cleanupTmpFile();