Overriding Configuration in Tests with Effect Typescript

I am writing tests and I have a test layer:
const TestLayer = ServiceThatIamTesting.DefaultWithoutDependencies.pipe(...)

One of the dependencies is Configuration layer. I provide some test configuration and write my tests with:
it.layer(TestLayer)((it) => {
    it.effect(...)


Now I have a scenario where I want to override one of the configuration values in one of the tests, how do I do it?
I tried these options but none of them work:
// inside test body
const serviceThatIamTesting = yield* ServiceThatIamTesting.pipe(Effect.provide(Layer.succeed(Configuration, Configuration.of(...))))

or:
it.effect(() => Effect.gen(...).pipe(Effect.provide(Layer.succeed(Configuration, Configuration.of(...)))))
Was this page helpful?