You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
@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!
The text was updated successfully, but these errors were encountered: