Suggestion for Layer Support in `@effect/vitest` Describe Function

I think it would be nice to have some api in the @effect/vitest describe function that would take a layer and provide it to all tests. E.g.

// before
describe("Users", () => {
  it.scoped("test 1", () =>
    Effect.provide(
      Effect.gen(function* () {}),
      MyLayer
    )
  )
})

// something like this might be cool
// My layer is provided to each test
describe("Users", MyLayer, () => {
  it.scoped("test 1", () =>  Effect.gen(function* () {}))
  it.scoped("test 2", () =>  Effect.gen(function* () {}))
})
Was this page helpful?