Effect CommunityEC
Effect Communityβ€’6mo agoβ€’
29 replies
Jon Higger (He / Him)

Is there a way to share a runtime across vitest?

I'm pretty new to effect-ts. I kind of jumped straight into something that I'd consider hard...

Basically what I'd really like to do is have it such that I can do the following with an integration test setup:

1. Migrate dbCount db's to the correct value, this would likely be a command I run before running any of my tests. This is in prisma, so to do the migration properly I really should be using a
prisma migrate dev
command
2. Using a bounded queue in effect, make sure that each test runs on it's own database when it's not being used

I think the part I'm struggling with is "How do I get all of these tests to share the same queue?", and I think the answer is "Managed Runtime".

Since it seems like @effect/vitest automatically creates a runtime, is this even possible?

Any help / general advice would be very much appreciated πŸ™‚
Was this page helpful?