How to test ServerFn with vitest ?
Hey guys,
I am trying to add some tests with vitest into my tanstack start app. And I tought I would test the bunch of serverFns that I have. I am using vitest for my testing framework and testcontainer to mock my db. So far those 2 libraries are working fine.
However when I try to call a serverFn in vitest I get the following error:
Here is what my test looks like:
auth.test.ts
dummy.actions.ts
db.middlewares.ts
2 Replies
deep-jade•7mo ago
Also interested in this!
vicious-goldOP•6mo ago
out of interest is this plan / technically achievable ? Or should I go about using a different testing strategy ? How do you guys test your tanstack app ?