-
Notifications
You must be signed in to change notification settings - Fork 273
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
feat: export container
from render
#567
Conversation
I can also change it to export In that case the API would be more like in the react-testing-library. |
+1 to this change, and +1 on adding |
I guess I am in favor of exposing Regarding wrapping of root element, I think that wrapping it in plain |
@thymikee What do you think? I can adjust it but I'd like to know if it is going to be merged 😄 |
Let's do it. Like @mdjastrzebski said |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the default wrapper, because it's orthogonal to returning the root instance and would require us to release this feature in a major release.
I left the peer dep on react-native, because it should be there anyway.
Thanks for the contribution!
container
from render
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, consider adding testID/nativeID checks in tests
…o wrapper defined
…nes that was importing react-native
Update the TS types for the new `container` property that was added to the output of `render` in callstack#567.
Update the TS types for the new `container` property that was added to the output of `render` in #567.
I just tried to use this and saw a couple of issues:
|
@thymikee are these 👆 done or being worked on, or would it be better if I make an issue for these? |
I don't think these are addressed. Please create an issue :) |
Summary
Exports
root
test instance from render method. It is a change mentioned in this feature request: #566After this change it is possible to get test instance from render method: