Skip to content

Commit da344b7

Browse files
Aviv Kelleraduh95
Aviv Keller
andauthored
fixup!
Co-authored-by: Antoine du Hamel <[email protected]>
1 parent 2af9778 commit da344b7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/parallel/test-repl-preview-newlines.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ repl.start({
2020
let output = '';
2121
outputStream.write = (chunk) => output += chunk;
2222

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

0 commit comments

Comments
 (0)