-
Notifications
You must be signed in to change notification settings - Fork 45
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
screen.debug()
logs undefined in Output Inspector
#3051
Comments
Wallaby does some patching of For some reason it looks like this isn't working for your project. It could be related to your testing framework, project dependencies, or perhaps something else. Can you please provide your Wallaby Diagnostics report? It contains the information that we need to investigate further. |
Bumping this issue in case you missed our reply. |
I have the same problem while logging My Diagnostics report can be found here: |
Thanks for your diagnostics report. We have found/fixed the issue. Please update to Wallaby core |
@smcenlly I actually did not receive any GH notifications except for when you closed the issue :) I have force updated the core to 1.0.1335 and I still get This is the diag report for a test repo that I created for a different issue. |
Your sample repo appears to be working for us when using the same version of VS Code, MacOS, node, and Wallaby. We're wondering if there's some cached transform in vite / vitest for the previous version of Wallaby. Could you please try cloning to a fresh directory to see if it works for you? If it does work for you, please try using the If you're still having problems, can you please let us know how you are installing your dependencies? We used |
Closing this issue as we haven't heard back. If you're still having issues, please let us know and we will re-open the issue. |
In hindsight I see that a duplicate was opened 2 weeks later: I have core version v1.0.1379, so I would expect to see the component being logged |
We have applied a fix for this that should address your issue, available in Wallaby core,
This is intentional. Do not expect Wallaby to output console.log inline for functions that return undefined; it may be intentional to log a function return value and we can't automatically patch all functions in this case. Our patch for
This issue was from 2020, almost 2 years before your issue was raised and was when we originally added support for |
Not sure if this is a bug report or a feature request. I remember it worked as expected long time ago, but I can't remember exactly.
(update: could be related to #165)
I'm trying to show the result of Testing Library's
screen.debug()
in the Output inspector.screen.debug()
returnsundefined
, so it makes sense thatundefined
is logged. However console.log is called internally so I still expect this to be in the Output explorer.If I call
console.log(prettyDOM())
, it works as expected.Maybe this happens because console.log calls are filtered by the files/tests lists? Is there a way to show console.logs for any file, just like when you run the tests from the terminal?
A second minor issue is that output is hard to read because of the logged color stops. Is it possible to apply those in the output?
Expected:
The text was updated successfully, but these errors were encountered: