I have been thinking about this more and I would sacrifice features for implementation simplicity. In the case of jest, it seems like it has to reinvent parts of webpack, under the assumption that your testing system should help you with mocking and stubbing.
With ReScript and some form of dependency injection, I think developers wouldn’t need to use mocking. At that point, recreating webpack mechanisms no longer justified. You could implement your testing system as something that hooks into the final phases of webpack.
Some people have been pursuing this with vitejs: https://github.com/zigomir/vite-test. I hope more projects like this emerge. Then, you would have one centralized config for your dev server and test system.
I feel the same way. I’ve wasted so much time trying to get finicky unit tests working. When I moved to Vite I put easily a dozen hours into trying to get jest working again for the few unit tests I have. I decided to punt on it and try to cover the majority of those tests with my integration tests instead.
Since i’m using Hexagonal Architecture and DDD principles, i don’t need mocking (i just create InMemory implementations of my adapters), and Zora + ReScript is the best combo ever for testing.
I never had such fast tool for developing in TDD.
Best regards to you
PS: I’m working on RxJs, Redux Toolkit & Pact bindings also, nice to have your repo as examples. It tends to be pretty straightforward to do bindings in ReScript, thx to their awesome API.
I’ve gotten Jest to work but it is a bit slow. Two features I like with it though. I can see the tests in the VS Code test explorer and run specific tests on demand. I can also trigger a debug of any test and walk through the code. Can either of these be done with Zora?
There’s a few weird parts of the bindings that I may log a ticket about at some point, but generally it was pretty seamless once I understood how to write in zora test style.
@flo-pereira using inline tests in native OCaml, I find this feature very interesting and would love to see it in rescript too, I created a new post about it, don’t hesitate to chime in!
I’ve been meaning to update this package to support async/await and Rescript 10.1 and finally got around to it today after a couple recent messages from folks agitating for it.
To be honest, I had kind of lost interest in Rescript because maintaining the promise-based tests in this package and rescript-dexie was tedious. The new async/await syntax is exactly what I wanted. Thanks to everyone who made it happen! <3 I would love to update the rescript-dexie bindings as well and maybe even republish some of my articles, but I am super busy with (non-code) things lately and not sure I’ll have the time.