You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
console.logs are intercepted/buffered by jest.
They are output along with source location, but are not grouped in any way. Some console.logs are even output after the test summary, even though they occur inside a test.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can npm install and npm test.
I have some async code using promises and tests with async/await. The code has console.logs and console.time/Ends scattered all over.
What is the expected behavior?
I would like jest to group the console output by test run. At the very least, jest should flush the buffered console.log messages before writing the test summary on the very end.
Run Jest again with --debug and provide the full configuration it prints. Please mention your node and npm version and operating system.
jest 17, node 7.1, archlinux
The text was updated successfully, but these errors were encountered:
If you run more than one test, Jest groups the log messages per-test. If you only run a single test or use --verbose, we don't buffer console calls. This is an escape hatch – if you have an infinite loop and we buffer console messages, none will show up at all. I recommend not using --verbose unless you are only running a single test.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
both feature and bug
What is the current behavior?
console.log
s are intercepted/buffered by jest.They are output along with source location, but are not grouped in any way. Some
console.log
s are even output after the test summary, even though they occur inside a test.If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can
npm install
andnpm test
.I have some async code using promises and tests with async/await. The code has
console.log
s andconsole.time/End
s scattered all over.What is the expected behavior?
I would like jest to group the console output by test run. At the very least, jest should flush the buffered
console.log
messages before writing the test summary on the very end.Run Jest again with
--debug
and provide the full configuration it prints. Please mention your node and npm version and operating system.jest 17, node 7.1, archlinux
The text was updated successfully, but these errors were encountered: