Skip to content

render does not return the renderer #32

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

Closed
wKovacs64 opened this issue Oct 15, 2018 · 3 comments
Closed

render does not return the renderer #32

wKovacs64 opened this issue Oct 15, 2018 · 3 comments

Comments

@wKovacs64
Copy link

The render section of the README says:

For convenience it also returns react-test-renderer's instance and renderer objects, in case you need more control.

But it doesn't. But it should! 🙂 Looks like they were removed in e6ac5ad, but I think they would be valuable (at least renderer). Was there a reason they were removed?

PR incoming to add them back.

@thymikee
Copy link
Member

Renderer was removed so you're not allowed to access the component internal instance. What's your use case?

@wKovacs64
Copy link
Author

The getBy APIs weren't finding something that I knew was there, so I needed to debug to see what react-native-testing-library was seeing. I was able to figure it out* using renderer.toJSON() (after modifying my local node_modules render.js to include renderer).

(* react-native's jest setup script was mocking out ScrollView, but that's neither here nor there)

@thymikee
Copy link
Member

Closing, as we've moved the discussion to the mentioned PR and changed the scope of the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants