Jest and Playwright for Tanstack Start.
Hello. I was searching for testing resource for Jest/Playwright on Tanstack Start but I couldn't find any appropriate resource. Even the docs doesnt have any dedicated section on Testing Tanstack Start applications. Is there any update/possibility of introducing a dedicated testing documentation/resources for Tanstack Start? Thanks
10 Replies
quickest-silver•4w ago
cc @Jack Herrington (jherr)
optimistic-gold•4w ago
As I recall we automatically install vitest. That's certainly my preferred test platform, not sure what @Manuel Schiller's position is. I think you make a good callout about the need for docs on this. Can you file an issue on the router for a documentation update: https://github.com/TanStack/router/issues . That will help us prioritize it and give motivated folks an opportunity to add it as an OSS contribution.
GitHub
TanStack/router
🤖 A client-first, server-capable, fully type-safe router and full-stack framework for the web (React and more). - TanStack/router
quickest-silver•4w ago
we will most likely only support vitest when it comes to testing stuff like server functions
correct-apricot•4w ago
What about something like e2e testing?
I’m actually about to e2e with playwright
I guess I shouldn’t even try
But still I don’t see why it wouldn’t work, I’ll just go ahead try doing it and see if I can figure it out maybe write the docs
conscious-sapphireOP•4w ago
For sure. ✨
Will do ASAP.
optimistic-gold•4w ago
Shouldn't even try? It should work just fine. You're just launching the server, and then using a browser to poke at the pages.
conscious-sapphireOP•4w ago
I agree with Jherr here. Its basically a browser environment testing the site.
The think its the subtle unease of breaking something and not finding any resources online regarding TS router or start.
Naturally, a dev who wants to learn Playwright (or Jest) would be more comfortable checking it out on a fresh Nextjs project, which has dozens of tutorials/blogs rather than Tanstack Start.
correct-apricot•4w ago
You are right
conscious-sapphireOP•4w ago
ps: I am actually working on a cool telemetry platform (using Nextjs) and I heavy rely on my exhaustive Jest test suites to keep it rigid. Honestly speaking, I am badly waiting for Tanstack Start to have good resources on Testing so that I can migrate.
conscious-sapphireOP•4w ago
GitHub
Dedicated documentation for Testing Tanstack applications. · TanSt...
Hello there. Just recently, I was searching for resources/tutorials on how to implement unit tests and E2E tests (Jest/Playwright) in Tanstack Start. I was not able to find any appropriate resource...