TanStackT
TanStack14mo ago
9 replies
sad-indigo

Run vitest to test API routes

Hey, I tried to run vitest to test public API routes.

I tried a few attempts at creating a dedicated vitest.config.ts file using various plugins (tanstack-router, tanstack-start-server-fn) but none proved useful.

Digging a bit, I suppose it lies in the abstraction provided by TanStack Start's defineConfig.

Here is my repro : https://github.com/potb/tanstack-start-vitest-repro/tree/main
GitHub
Created with StackBlitz ⚡️. Contribute to potb/tanstack-start-vitest-repro development by creating an account on GitHub.
GitHub - potb/tanstack-start-vitest-repro: Created with StackBlitz ...
Was this page helpful?