Daniel SD
tRPC3y ago
Daniel S

Examples of Vitest with React Testing Library

Does anyone have examples of how to mock data from tRPC procedure calls? I have client components that are fetching data using tRPC , and I want to run integration tests.

I have been attempting to use vi.mock() to mock this data but I haven't gotten it to work correctly. Thanks in advance!

https://vitest.dev/guide/mocking.html
A blazing fast unit test framework powered by Vite
Vitest
Was this page helpful?