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

Vitest[0] is a drop in replacement to Jest that we've had exceptional success with. Faster test runs, more reliable, default TS and ESM support, etc.

[0] https://vitest.dev/




Vitest may not be a good drop in replacement either. It uses Workers for multi-threading via Tinypool. For us, we use the AWS SDK and the binaries in it would cause Vitest to crash. After wasting a lot of time, we had to retreat back to Jest.

I really like Vitest, and it's a great fit for lots of projects. I'm a bit sad it wasn't for ours.


Just curious, were you using v2 or v3 of the AWS SDK? I was going to try Vitest after reading these comments, but maybe it's not feasible right now.


Big fan of vitest, I like typescript and esm support out of the box and without adding dependencies like types/jest or ts-jest. I've filed bugs and pull requests and the maintainers have been responsive


It is most definitely not drop in. I looked into this yesterday funnily enough and you can expect to have to make many syntax changes to your test files.


It's an _almost_ drop in replacement - when I tried migrating our tests recently (because of memory leak issues / slowness resulting from Jest + a Node upgrade) I found I had to manually finagle a lot of our mocks to get them working.


Does vitest have this same issue or make a trade off to avoid it like jest-light-runner


That seems tied to Vite though?


It's actually not! You can use vitest in a node environment as well just fine.




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

Search: