sentrionic/Valkyrie

Add Testing

ayuhito opened this issue · 3 comments

Hey there,

I absolutely love your project as it has been really useful in teaching me how to structure a medium-sized application, although I'm creating something functionally different (still in the planning stages and I'm looking for partners for help since it's a somewhat ambitious commercial product, but I do see a clear gap in the market for it). I was really surprised to find this as we are using pretty much the exact same techstack (next, chakra, zustand + nestjs, fastify, prisma - close enough), so this has been really useful to reference and learn from!

I've seen in the package.json scripts that you do have tests, but they don't seem to be shown on the repository here. Is that intentional?

NestJS automatically generates those test scripts. This project does not have any tests.
Testing is something I still have to learn more and actually do in future projects.

Awesome. I guess we can leave this issue open since it is something that could be addressed in the future.

To give a small update to this issue:

  • Since then I've replaced the NestJS backend with a Go version which I initially made to practice Go and ended up liking more than the NestJS one.
  • I have written tests for the service and handler layers of said Go application as well as E2E tests.
  • For the React client I have written tests for the React-Query since they form the central data fetching part of the app.
  • I have also added E2E tests using Cypress to test the general usage
  • The tests run for pull & push requests using Github Actions.

I will probably not do UI testing, but I will take a look at Snapshot testing for the React client.
I would say this is still more than the usual clones get and enough to close this issue.