Testing Server Functions with vitest (including validation + middleware)
Hi friends - looking to write tests for my server functions (preferring vitest, but openminded).
With my current implementation, the "result" of my function call is
undefined
even when logs inside the function body show that it should be returning data. Additionally, it looks like middleware
and validator
functions are not running (I'm seeing no logs from my middleware functions, and not getting the expected errors from validation or auth middleware).
Looking for any guidance on the write setup here!
Example code:
createUser.ts
createUser.test.ts
0 Replies