Using Layer for Dependency Management and Testing

Is this pattern generally fine?
export const RedisSyncEventManagerLive = RedisSyncEventManager.pipe(
  Layer.provide([RedisService.Default, SyncEventPersistenceServiceLive])
);



Like I have a default implementation for a service (but it cant be an Effect.Service so I get a Layer.Layer<ServiceImpl, never, R> (in this case RedisSyncEventManager)

For the live usage I want all dependencies satisfied, but i still want to test the (general) implementation in tests with a memory test container...
Was this page helpful?