Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
2 people authored and avivkeller committed Sep 23, 2024
1 parent 19c6ac2 commit 84cf466
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/parallel/test-repl-preview-newlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ repl.start({
let output = '';
outputStream.write = (chunk) => output += chunk;

const testChars = ['\\n', '\\v', '\\r'];

for (const test of testChars) {
inputStream.emit('data', `"${test}"()`);
for (const testChar of '\n\v\r') {
inputStream.emit('data', `${JSON.stringify(testChar)}()`);
// Make sure the output is on a single line
assert.strictEqual(output, `"${test}"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A`);
assert.strictEqual(output, `${JSON.stringify(testChar)}()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A`);
inputStream.run(['']);
output = '';
}

0 comments on commit 84cf466

Please sign in to comment.