Skip to content
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

Document non-react testing utility - createMockClient #268

Open
jeremybini opened this issue Oct 19, 2020 · 1 comment
Open

Document non-react testing utility - createMockClient #268

jeremybini opened this issue Oct 19, 2020 · 1 comment
Labels
🧪 testing Feature requests related to testing

Comments

@jeremybini
Copy link

We have a mixed application that uses Apollo Client for both React and non-react code.

Testing React code is easy and convenient given the exported and documented MockedProvider utility, however, for our non-react code, there is no clear documentation on the correct way to test usages of the client.

I noticed that apollo client exports a mock client from the testing directory

import { createMockClient } from '@apollo/client/testing'

Documenting and supporting this library as a valid form of testing the client would be very useful for those of us testing non-react code; additionally, it would alleviate the need for our own mock implementations or 3rd party libraries.

@jpvajda
Copy link
Contributor

jpvajda commented Jun 1, 2022

I'm linking this to a umbrella issue about testing in the apollo client repo apollographql/apollo-client#9738

@jpvajda jpvajda added the project-apollo-client (legacy) LEGACY TAG DO NOT USE label Jun 1, 2022
@jerelmiller jerelmiller added the 🧪 testing Feature requests related to testing label Apr 6, 2023
@jerelmiller jerelmiller removed the project-apollo-client (legacy) LEGACY TAG DO NOT USE label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧪 testing Feature requests related to testing
Projects
None yet
Development

No branches or pull requests

3 participants