We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84cf466 commit 500c5eeCopy full SHA for 500c5ee
test/parallel/test-repl-preview-newlines.js
@@ -20,10 +20,10 @@ repl.start({
20
let output = '';
21
outputStream.write = (chunk) => output += chunk;
22
23
-for (const testChar of '\n\v\r') {
24
- inputStream.emit('data', `${JSON.stringify(testChar)}()`);
+for (const char of ['\\n', '\\v', '\\r']) {
+ inputStream.emit('data', `"${char}"()`);
25
// Make sure the output is on a single line
26
- assert.strictEqual(output, `${JSON.stringify(testChar)}()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A`);
+ assert.strictEqual(output, `"${char}"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A`);
27
inputStream.run(['']);
28
output = '';
29
}
0 commit comments