Replies: 5 comments 4 replies
-
Hiya 👋 All of these suggestions from the Testing guide apply to any framework, since the |
Beta Was this translation helpful? Give feedback.
-
Ty for some reason provideClient didnt work for me, so i did it like this in case some one else faces the same issue:
|
Beta Was this translation helpful? Give feedback.
-
Hi guys, I've been trying to mock the client and I haven't had any success. I couldn't understand how to replace |
Beta Was this translation helpful? Give feedback.
-
Hey guys! I'd like to also bump this, because I've spent the last couple of hours and I cannot make it work. If you do exactly as shown in the docs and pointed out above, it looks something like this: const mockClient = {
executeQuery: vi.fn(() => never),
executeMutation: vi.fn(() => never),
executeSubscription: vi.fn(() => never),
};
provideClient(mockClient); This causes this error: Adding the url, thus: const mockClient = {
url: 'foo',
executeQuery: vi.fn(() => never),
executeMutation: vi.fn(() => never),
executeSubscription: vi.fn(() => never),
};
provideClient(mockClient); Causes the error: Is there anything we're missing? Also, @T0miii's solution didn't work for me, provided that where it says Thanks a bunch |
Beta Was this translation helpful? Give feedback.
-
Hi guys, |
Beta Was this translation helpful? Give feedback.
-
Hello,
is there an example how to mock the Urql client for jest with the Vue Implementation?
ty
Beta Was this translation helpful? Give feedback.
All reactions