r/react • u/MS_Pwr_Dev • 9d ago
General Discussion Testing file sprawl
The last few projects I’ve worked on, I’ve implemented comprehensive testing (at least what I think is comprehensive). The problem is that I’m seeing just how many files and lines of tests it takes to be comprehensive.
I’ve been using jsdom and React Testing Library for these Vite TypeScript projects. Are there any alternatives that offer more shorthanded ways to do the same testing? One testing file per component/file seems unsustainable, but I also realize that less isn’t always more and “less” is arbitrary/subjctive.
If those are the gold standard, is there a way you organize your files that makes it more efficient/maintainable?
5
Upvotes