Hacker News new | past | comments | ask | show | jobs | submit login

I don't use Vite though. Aside from typescript, I'm trying to be as vanilla/unopinionated as possible, using Web Components for example. And there are hundreds of Jest tests I don't want to port.



You can use vitest like a standalone testing tool, it will install vite as dev-dependency but you don't need to build your whole project around vite.

In my case it was literally a drop-in-replacement for jest, done in two minutes and without a config file. A simple config file only was required a bit later when I added test- and coverage-reporting as junit.xml and cobertura format for Gitlab CI.

Didn't even have to change a single line of testing code (I didn't use Jest's mocking magic in that project though).


Just wanted to say thanks for this recommendation. I'm not finished yet, but it seems like a huge improvement over all the wtf of jest, along with a lot of new niceties.


Maybe I spoke too soon, cyclical imports problem seems pretty big.


oh yeah, and this esbuild keepNames nonsense has lost me some hair.


Thank you, it sounds pretty good, especially solving the modules problem. I will look into it when finished current sprint.




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

Search: