Closed thiagomini closed 9 months ago
@thiagomini, thank you for the kind words! ๐Iโd be happy to take contribution like that, actually I was a bit fed up with Jest as it looks like abandonware, I was considering switching to vitetest. TBT I didnโt know that Node has native testing tool ๐ As you said, the less dependency the better.
Before you go with PR, one question: How does it deal with async setup? Iโm planning to have a lot of integration tests, so that will be pretty important ๐
Hey again, Oskar, I'm happy to help! And I agree, Jest looks like abandonware ๐ I often advise avoiding it!
About the async setup, if you mean to use beforeEach()
and beforeAll()
async hooks, it works just the same as Jest, so no significant changes there! But if you mean global setup files and similar, we can run these tests programmatically by using the run command that accepts options
Nah, beforeEach and beforeAll is good enough for me ๐ If thereโs also possibility to define file naming conventions like in Jest, so e.g. unit.test.ts, int.test.ts then Iโm sold and green light from me ๐
Hey there, Oskar - I really appreciate the effort of creating a Node version of Marten, which is something I've been missing in the JS ecosystem. As a fellow TS programmer and Event-sourcing enthusiast, I'd like to contribute to this tool - and my first suggestion is to use Node's native test runner to run its tests. It is way faster than Jest, and it's one less dependency in the repo, which is always great.
I've created a repo showing how easy it is to set it up with Typescript, and you'll see that it's API is basically the same as Jest or other famous test runners (like Vitest). The idea is to improve the DevEx for the contributors of this package by leveraging native tools.
I can create a PR to configure the repo to use it - just let me know if you agree!