4 ms·
I’d love to hear more about your reasoning because it’s not the experience I’ve had, but I’ve heard it before and would like to understand it more. I personall
by danpalmer 3y ago
I’d love to hear more about your reasoning because it’s not the experience I’ve had, but I’ve heard it before and would like to understand it more.
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.
- stevebmark 3y agoThe specific workflow for Jest I really enjoy: - 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.