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

Any idea what people have generally moved on to? Currently using jest but its definitely showing its warts often and is pretty slow. Curious if there is an obvious successor.


Vitest is the incumbent I would say, but there seems to be a lot of momentum behind the runtime-builtin test runners recently. Bun is gaining traction like nothing else, and node has put a lot of work into the test builtins lately.


Node's test runner is a non-contender, at least right now.

If you've ever used any other test runner, you'll find Node's is woefully inferior. I'd say "but maybe it will get better", except I've seen the maintainer responses to several issues, and it seems they are wedded to bad architectural decisions that keep it that way.


The node test runner is perfect for small libraries without build where you pretty much ship the source code. The assertion library is actually superior to vitest’s if you don’t use spies etc. because unlike vitest’s assertions, the node ones do type narrowing correctly.


I moved back to Mocha with Chai for a while (both have great ESM support, quietly still well maintained, despite predating Jest) and then to Node's built-in test harness (and Deno's), sometimes still using Chai rather than `node:assert/strict` or `jsr:@std/assert`.

But I wasn't using a lot of Jest features anyway, generally preferred Mocha even during the height of Jest's popularity, and Node's test runner is sufficient for most of my needs (and Deno's starts to seem more and more the path forward as I come to prefer deno.json in a lot more types of projects than package.json).


I've had a really good experience with vitest


There's always Mocha.


Vitest is what people have been suggesting to me.




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

Search: