I personally found Jest to do a lot of magic that, as an only occasional contributor to JS codebases, made it somewhat impenetrable.
As a comparison, many testing libraries look a lot like Python’s unittest if you squint, a design originated in the Java ecosystem I think. I find I can move between testing many languages and be immediately productive with test and know how things work, which is a huge productivity bonus.
Alternatively, I’ve found pytest’s dependency injection makes writing tests really nice and easy, the whole lifecycle management is very good. I’d even consider coordinating integration tests with it if I was just running precompiled binaries etc.
- Opening an editor split with a terminal
- Running Jest in watch mode
- Using a pattern to pick specific test(s) at a time
- Editing tests and code to either fix bugs or add features, and watching the test quickly re-run every save
Specifically the watch interface of Jest, which seems pretty simple, is great. It's a joyful way to work on code. Any test runner that doesn't support this workflow is a nightmare. And I don't get why many test runners don't support this workflow, it seems pretty easy to implement.
Ironically it's vitest that doesn't support this (IIRC, haven't checked in a minute)