Lines Matching defs:const

5 const common = require('../common');
6 const stream = require('stream');
7 const REPL = require('internal/repl');
8 const assert = require('assert');
9 const fs = require('fs');
10 const path = require('path');
11 const { inspect } = require('util');
15 const tmpdir = require('../common/tmpdir');
21 const defaultHistoryPath = path.join(tmpdir.path, '.node_repl_history');
26 const _iter = data[Symbol.iterator]();
27 const doAction = () => {
28 const next = _iter.next();
34 const action = next.value;
51 const ENTER = { name: 'enter' };
52 const UP = { name: 'up' };
53 const DOWN = { name: 'down' };
54 const LEFT = { name: 'left' };
55 const RIGHT = { name: 'right' };
56 const DELETE = { name: 'delete' };
57 const BACKSPACE = { name: 'backspace' };
58 const WORD_LEFT = { name: 'left', ctrl: true };
59 const WORD_RIGHT = { name: 'right', ctrl: true };
60 const GO_TO_END = { name: 'end' };
61 const DELETE_WORD_LEFT = { name: 'backspace', ctrl: true };
62 const SIGINT = { name: 'c', ctrl: true };
63 const ESCAPE = { name: 'escape', meta: true };
65 const prompt = '> ';
66 const WAIT = '€';
68 const prev = process.features.inspector;
72 const tests = [
120 'const foo = true', ENTER,
146 // UP - skipping const foo = true
169 `const x1 = '${'あ'.repeat(124)}'`, ENTER, // Fully visible
171 `const y1 = '${'あ'.repeat(125)}'`, ENTER, // Cut off
173 `const x2 = '${'?'.repeat(124)}'`, ENTER, // Fully visible
175 `const y2 = '${'?'.repeat(125)}'`, ENTER, // Cut off
177 `const x3 = '${'?'.repeat(248)}'`, ENTER, // Fully visible
179 `const y3 = '${'?'.repeat(249)}'`, ENTER, // Cut off
181 `const x4 = 'a${'\u0301'.repeat(1000)}'`, ENTER, // á
183 `const ${'veryLongName'.repeat(30)} = 'I should be previewed'`,
185 'const e = new RangeError("visible\\ninvisible")',
540 yield 'const ArrayIteratorPrototype =';
543 yield 'const {next} = ArrayIteratorPrototype;';
545 yield 'const realArrayIterator = Array.prototype[Symbol.iterator];';
583 test: ['const util = {}', ENTER,
586 prompt, ...'const util = {}',
598 'const utilDesc = Reflect.getOwnPropertyDescriptor(globalThis, "util")',
604 prompt, ...'const utilDesc = ' +
636 const numtests = tests.length;
638 const runTestWrap = common.mustCall(runTest, numtests);
652 const opts = tests.shift();
655 const { expected, skip } = opts;
662 const lastChunks = [];
669 const output = chunk.toString();