-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Add relevant stacktrace to act warnings #18359
Comments
Oh, and here's a reproduction: https://github.com/kentcdodds/act-stack-example |
Isn’t this something Jest should do? The browser does it. |
Also the repo is empty. :-) |
Oh, sorry about that. It was basically this: https://codesandbox.io/s/angry-curran-0mv31 Except codesandbox doesn't always work well with tests so feel free to download that to investigate further. And if the browser does this then yes, this is probably something Jest should do. Any chance you could transfer this issue? |
To transfer the issue, we'd need permissions in the Jest repo too 😆 and I, at least, don't have them. |
I have a strong deja vu |
lol 😂 I totally forgot about that Sorry for the trouble 😅 |
React version: ^16.8.0
Steps To Reproduce
Link to code example:
The current behavior
Right now the act warning gives a component stack trace which is nice, but in the age of reusable hooks, it's not enough to help people really identify where the issue is because it could be in hooks far away from the component.
Here's an example of the output:
The expected behavior
I think it would be nice if a stack trace were included in addition to the component stack trace. I would expect that the stack would only include non-react code.
Here's an example of what I think would look good:
In a more real world scenario (like one I'm dealing with right now) here's what it might look like:
That would be an enormous help because the offending code is not my own but one of my dependencies.
Thanks!
The text was updated successfully, but these errors were encountered: