Re:Full-Stack TypeScript with tRPC and React
by matthewfcarlson on Tuesday March 14, 2023 @04:26PM
(#35157916)
I used tRPC with Cloudflare workers and a Vue/Pinia front-end and really loved the experience. tRPC was a bit of a fussy one to setup but once it was setup, it was a real pleasure to work with. Being able to test the calls with unit tests was also fantastic
[ Parent
| on HN ]
Re:Full-Stack TypeScript with tRPC and React
by karlosos on Tuesday March 14, 2023 @08:41PM
(#35161994)
Could you elaborate more on how you approached testing the applications that use tRPC? I was looking for example big projects that use tRPC but they don't have tests [0]. I am wondering what you mean by testing calls with unit tests. Have you been testing individual endpoints, e.g. `trpc.postst.getAll`, or have you been testing components that use tRPC endpoints? I would appreciate some examples.
[0] https://trpc.io/docs/awesome-trpc#-open-source-projects-usin...
Re:Full-Stack TypeScript with tRPC and React
by alexdotjs on Wednesday March 15, 2023 @03:59AM
(#35165214)
Here's an example of testing: https://github.com/trpc/examples-next-prisma-starter/blob/ma...