Open medikoo opened 6 years ago
Could you setup a repro so it's easier to approach this case?
Could you setup a repro so it's easier to approach this case?
https://repl.it/@medikoo/stderr-stdout-sync-issue
Still it's not perfectly reliable, as behaves differently than in system terminal (but bug remains visible, as still output is out of sync). Also it runs Jest v22 and not latest 23 (not sure how I can bump it over there).
To reproduce locally is as easy as creating some.test.js
file (with content as listed above) within some empty project folder, and running jest
in it (no config or any other files are needed and assuming jest
is installed globally).
What is the status of this issue?
Solution to this is probably for Jest to intercept process.stdout
in the same way it does console.*
. That way we can send the output to a reporter who can print it in a controlled fashion instead of every line of code being able to intercept
Is it on the roadmap to also intercept process.stderr
? That's what is the standard for most logging libraries, is to use stderr for logs.
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
bump
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.
How can such terrible bug, be not handled for 6 years, phew..
π Bug Report
data streamed to
process.stdout
andprocess.stderr
does not appear in sync.It makes debugging in some cases difficult and very confusing e.g. I work with application where some parts, rely on
console.log
(so propagate debug logs tostdout
) while some app dependencies output debug logs via popular debug library (which propagates logs tostderr
)Logs from both sources appear out of sync, which makes reliable debugging quite difficult.
To Reproduce
In empty project create
some.test.js
:After running
jest
output is as follows:Expected behavior
Output as:
Env info