Skip to content

More helpers for testing hooks #129

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
hyochan opened this issue Mar 12, 2019 · 3 comments
Closed

More helpers for testing hooks #129

hyochan opened this issue Mar 12, 2019 · 3 comments

Comments

@hyochan
Copy link

hyochan commented Mar 12, 2019

Ask your Question

I'd like to know how to test context-api with react-native-testing-library.
It is supported int react-testing-library as in #296. Also, [useContext] could be covered which was addressed in #283.

I searched for api doc and I am not seeing any use-case for this one.

@hyochan hyochan added the question Further information is requested label Mar 12, 2019
@thymikee
Copy link
Member

No, we don't have that.

@hyochan
Copy link
Author

hyochan commented Mar 12, 2019

I'd like to request feature for better react-hook support such as useContext, useRef.

P.S. When wrapping component with forwardRef, testingLib = render(component) testingLib won't grab the existing testID by getByTestId.

@thymikee thymikee added feature request and removed question Further information is requested labels Mar 12, 2019
@thymikee thymikee changed the title Is there a wrapper for testHook? More hlpers for testing hooks Mar 12, 2019
@hyochan hyochan changed the title More hlpers for testing hooks More helpers for testing hooks Mar 12, 2019
@thymikee
Copy link
Member

thymikee commented Jun 18, 2019

If you are interested in testing a custom hook, check out react-hooks-testing-library. That's the current recommendation from the Testing Library

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