Skip to content

Commit 953874e

Browse files
jenthonemeixg
authored andcommitted
test: add more bracket cases
1 parent 814248a commit 953874e

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

test/parallel/test-repl-preview.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,28 @@ async function tests(options) {
207207
'{[Sym\x1B[90mbol\x1B[39m\x1B[13G\x1B[0Kb\x1B[90mol\x1B[39m\x1B[14G\x1B[0Ko\x1B[90ml\x1B[39m\x1B[15G\x1B[0Kl.for("{")]: 0 }\r',
208208
'{ [\x1B[32mSymbol({)\x1B[39m]: \x1B[33m0\x1B[39m }',
209209
],
210+
}, {
211+
input: '{},{}',
212+
noPreview: '{}',
213+
preview: [
214+
'{},{}',
215+
'\x1B[90m{}\x1B[39m\x1B[13G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
216+
'{}',
217+
],
218+
}, {
219+
input: '{} //',
220+
noPreview: 'repl > ',
221+
preview: [
222+
'{} //\r',
223+
],
224+
}, {
225+
input: '{throw 0}',
226+
noPreview: 'Uncaught \x1B[33m0\x1B[39m',
227+
preview: [
228+
'{thr\x1B[90mow\x1B[39m\x1B[12G\x1B[0Ko\x1B[90mw\x1B[39m\x1B[13G\x1B[0Kw 0}',
229+
'\x1B[90m0\x1B[39m\x1B[17G\x1B[1A\x1B[1B\x1B[2K\x1B[1A\r',
230+
'Uncaught \x1B[33m0\x1B[39m',
231+
],
210232
}];
211233

212234
const hasPreview = repl.terminal &&

0 commit comments

Comments
 (0)