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 2af9778 commit da344b7Copy full SHA for da344b7
test/parallel/test-repl-preview-newlines.js
@@ -20,12 +20,10 @@ repl.start({
20
let output = '';
21
outputStream.write = (chunk) => output += chunk;
22
23
-const testChars = ['\\n', '\\v', '\\r'];
24
-
25
-for (const test of testChars) {
26
- inputStream.emit('data', `"${test}"()`);
+for (const testChar of '\n\v\r') {
+ inputStream.emit('data', `${JSON.stringify(testChar)}()`);
27
// Make sure the output is on a single line
28
- 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`);
29
inputStream.run(['']);
30
output = '';
31
}
0 commit comments