-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
parent() not work #1230
Comments
The wrapper has no parent in enzyme 3 - it's the top of the tree. |
maybe wrapper isn't the actual wrapper. I think parent() is broken as well. See #1373 |
I'm also having a problem with Test script:
Output:
|
@chriswatrous I believe your issue is covered by #1373. I'm going to close this; please file new issues for other concerns. |
@ljharb this still happens for 3.5.0 |
@huchenme can you file a new issue, with repro steps? |
@ljharb Hi, I am encountering this bug, too. This is a repo for reproducing the bug: https://github.com/upupming/enzyme-parent-bug |
parent() still does not work but parents().at(0) works and returns correct element |
After I upgrade to
react@16
andenzyme@3
.parent()
does not work for me.I try to use
wrapper.parent()
, and it returnsnull
to me.However,
wrapper.parents().first()
does work. It returns the correct component.The text was updated successfully, but these errors were encountered: