Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repl: add completion preview #30907

Closed
wants to merge 12 commits into from
Prev Previous commit
fixup: test: add multiple repl preview tests
  • Loading branch information
BridgeAR committed Dec 14, 2019
commit 2138fd790661d284ba8de799b4c10f27c6092beb
14 changes: 9 additions & 5 deletions test/parallel/test-repl-history-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ const tests = [
ENTER,
'veryLongName'.repeat(30),
ENTER,
`${'\u001b[90m \u001b[39m'.repeat(230)} fun`,
`${'\x1B[90m \x1B[39m'.repeat(235)} fun`,
ENTER,
`${' '.repeat(245)} fun`,
`${' '.repeat(236)} fun`,
ENTER
],
expected: [],
Expand All @@ -137,13 +137,17 @@ const tests = [
],
expected: [
prompt,
`${prompt}${' '.repeat(245)} fun`,
`${prompt}${' '.repeat(230)} fun`,
// This exceeds the maximum columns (250):
// Whitespace + prompt + ' // '.length + 'function'.length
// 236 + 2 + 4 + 8
`${prompt}${' '.repeat(236)} fun`,
`${prompt}${' '.repeat(235)} fun`,
' // ction',
' // ction',
`${prompt}${'veryLongName'.repeat(30)}`,
`${prompt}e`,
'\n// RangeError: visible'
'\n// RangeError: visible',
prompt
],
clean: true
},
Expand Down