-
Notifications
You must be signed in to change notification settings - Fork 462
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 testing/fixture docs #554
Conversation
💥 No ChangesetLatest commit: 54c9368 Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂 If these changes should be published to npm, you need to add a changeset. Click here to learn what changesets are, and how to add one. Click here if you're a maintainer who wants to add a changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good to me! Great work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome. I'll be reading this more thoroughly myself 😅
I'm attempting to follow these instructions right now and am finding that
I am calling Provider like so:
and the typescript error is:
|
@bstro this is because the mocks in the example don't match the actual client. The way to go is to cast this as an any. I'll add a note about this to the docs. const mockClient: any = {
executeQuery: () => {},
executeMutation: () => {},
executeSubscription: () => {},
} |
* Add testing docs * Add testing docs * Clarify what is react specific * Update docs/core/testing.md * Update docs/core/testing.md * Move Testing to Advanced
About
Docs on how to test + create fixtures with Urql!
It covers
View markdown
Notes