Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
Aviv Keller and aduh95 authored Sep 23, 2024
1 parent 2af9778 commit da344b7
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`);

Check failure on line 26 in test/parallel/test-repl-preview-newlines.js

View workflow job for this annotation

GitHub Actions / test-macOS

--- stderr --- node:assert:90 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected + '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[13G\x1B[1A' - '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A' at Object.<anonymous> (/Users/runner/work/node/node/test/parallel/test-repl-preview-newlines.js:26:10) at Module._compile (node:internal/modules/cjs/loader:1557:14) at Object..js (node:internal/modules/cjs/loader:1702:10) at Module.load (node:internal/modules/cjs/loader:1328:32) at Function._load (node:internal/modules/cjs/loader:1138:12) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:165:5) at node:internal/main/run_main_module:30:49 { generatedMessage: true, code: 'ERR_ASSERTION', actual: '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[13G\x1B[1A', expected: '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A', operator: 'strictEqual' } Node.js v23.0.0-pre Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /Users/runner/work/node/node/test/parallel/test-repl-preview-newlines.js

Check failure on line 26 in test/parallel/test-repl-preview-newlines.js

View workflow job for this annotation

GitHub Actions / test-linux

--- stderr --- node:assert:90 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: + actual - expected + '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[13G\x1B[1A' - '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A' at Object.<anonymous> (/home/runner/work/node/node/test/parallel/test-repl-preview-newlines.js:26:10) at Module._compile (node:internal/modules/cjs/loader:1557:14) at Object..js (node:internal/modules/cjs/loader:1702:10) at Module.load (node:internal/modules/cjs/loader:1328:32) at Function._load (node:internal/modules/cjs/loader:1138:12) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:217:24) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:165:5) at node:internal/main/run_main_module:30:49 { generatedMessage: true, code: 'ERR_ASSERTION', actual: '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[13G\x1B[1A', expected: '"\\u000b"()\n\x1B[90mTypeError: "\x1B[39m\x1B[9G\x1B[1A', operator: 'strictEqual' } Node.js v23.0.0-pre Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/parallel/test-repl-preview-newlines.js
inputStream.run(['']);
output = '';
}

0 comments on commit da344b7

Please sign in to comment.