Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is likely just a me problem, but I always found Jest extremely annoying to set up with React and TypeScript - particularly with attempting to follow the documentation for jest and then failing spectacularly (in spite of using React Testing Library, jsdom + jest).

Cypress on the other hand I found to be really, really good



Cypress and Jest aren't really operating at the same level though. Cypress competes more with Playwright (functional, E2E tests), and Jest competes more with Vitest, Chai, Mocha, Jasmine for unit tests (though it can also do much more).

Personally I prefer Vitest to Jest... if it will work for the codebase I'm in.


vitest, like everything to do with vite, just works. The API is almost identical to Jest so you can swap over easily.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: