-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add tests #5
Comments
just out of curiosity, how can I go about testing components using these hooks? I'm currently getting a |
@trojanowski apologies as I'm still new to testing Apollo components, but there should be a way to use const wrapper = mount(
<MockedProvider mocks={mocks}>
<ApolloHooksProvider>
<SearchResults />)
</ApolloHooksProvider>
</MockedProvider>
) |
I created a repo with a sample test: https://github.com/trojanowski/react-apollo-hooks-sample-test. A few notes:
|
@trojanowski thanks! I had figured out the first two steps last night, but 3 and 4 are what brought it home for me. Awesome work! |
Use Jest and react-testing-library.
The text was updated successfully, but these errors were encountered: