3 ms·
Same. Every time I dive into a repo using Jest it infuriates me. So slow. The built in test runner is great.
by afavour 4y ago
Same. Every time I dive into a repo using Jest it infuriates me. So slow. The built in test runner is great.
- xavdid 4y agoFunny, I have the same reaction for Mocha and always wish it was Jest instead. I love that jest includes all the batteries to get stuff done.
- nailer 4y agoSwapping between vitest and jest, vitest is much faster. Haven't used Mocha for a few years now.
- rockwotj 4y agoTake a look at vitest.dev, it's pretty fast and great (especially for typescript)
- afavour 4y agoTo be honest the built-in test runner does everything I want.
- jitl 4y agoJest is slow in part because it fully isolates each test file from every other test file. For small, highly-experienced teams those guardrails don't provide much benefit. For large teams, that isolation is essential to prevent cross-test contamination. Another reason Jest is slow is due to how it's usually configured to build code using Babel or tsc. Like vitest, you can configure Jest to use esbuild which makes it much faster than using Babel or tsc. I am not a big Jest fan, but it seems like the most pragmatic test runner when you have 100+ engineers working on a project.