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 |
thymikee
left a comment
There was a problem hiding this comment.
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
mdjastrzebski
left a comment
There was a problem hiding this comment.
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
roottest 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: