Repository navigation
test module corrupts console.log output #47955
Copy link
Copy link
Closed
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Activity
console.errordoesn't seem to have this problem. I'll useconsole.erroras a workaround.It seems that if a line starts with a space character, only the first word in the line is printed.
This code, for example:
import test from 'node:test' test('bug', () => { console.log('hello world') console.log(' hello world') })
outputs the following:
ℹ hello world ℹ hello- addedtest_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on May 11, 2023 I found the issue in the TapParse, can I work on this issue?
- addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on May 11, 2023 this will be fixed by #47867 so no need to fix
TapParseReacted by Max CoplanThanks @MoLow! For the sake of the coding exercise, was the issue because of tap laxer (
tap_lexer.js)?By the way the fix PR you linked seems not the correct one ^ 47867 instead of 47955 (which is this issue itself)
Reacted by Moshe AtlowFor the sake of the coding exercise, was the issue because of tap laxer (tap_lexer.js)?
don't know :)
Reacted by jakecastelli- added a commit that references this issue
on May 15, 2023 - added a commit that references this issue
on May 15, 2023 - added a commit that references this issue
on Jul 6, 2023 - added a commit that references this issue
on Jul 6, 2023
Metadata
Metadata
Assignees
Labels
confirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Version
v20.1.0
Platform
Linux strapurp 5.15.0-56-generic #62-Ubuntu SMP Tue Nov 22 19:54:14 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
test/test-bug.mjs:Run:
node --test test/test-bug.mjsHow often does it reproduce? Is there a required condition?
100% repro rate (not flaky).
Seems to happen when
[is logged.What is the expected behavior? Why is that the expected behavior?
console.login--testmode should show output similar toconsole.login normal Node.js:What do you see instead?
Logged elements of the Uint8Array are missing:
Additional information
I encountered this bug with Uint8Array.
I also encountered this bug with code like the following: