-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReporterDispatcher set result.console to undefined #8499
Comments
I'm seeing this as well. |
I think I have a fix for jest to re-enable this functionality. Sending a PR shortly. |
I missed this issue, sorry! Background is in #8233. Essentially - if you need the console output at the end of a run, buffer it yourself on a test by test basis. There's most probably some faulty types here that could have made that error visible, at least to TS users. |
Any updates on this, @SimenB? I'm trying to create a custom reporter to sets a max warning threshold like |
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. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
The ReporterDispatcher overrides
TestResult.console
property withundefined
. As a result of this - the console output cannot be used in custom reporters like jest-junit.To Reproduce
This behaviour is visible in the source code in version @jest core 24.8.0.
Line 43:
https://github.com/facebook/jest/blob/master/packages/jest-core/src/ReporterDispatcher.ts
Expected behavior
The console output should be forwarded to the test reporters. But first we have to check for what reason the
console
property is set toundefined
.Link to repl or repo (highly encouraged)
Steps to reproduce the 'error':
If you debug the code or add some debug outputs you notice that the TestResult.console property is defined - but after passing the ReporterDispatcher it is set to undefined
The text was updated successfully, but these errors were encountered: