Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Create provideCustomLayer #2907

@jdegoes

Description

@jdegoes

In many user-cases, provideSomeLayer will be utilized:

  • to provide the non-ZEnv part of the environment
  • to provide the non-(ZEnv + test) part of the environment (ZIO Test)

We could have helpers, provideCustomLayer, affixed to the data types, which simply call provideSomeLayer, and which fix the remainder to be ZEnv (in ZIO Core) and ZEnv + TestEnvironment (in ZIO Test).

Then a lot of user-land tests could be simplified to spec.provideCustomLayer(myCustomLayer), and a lot of App run functions could switch to using provideSomeLayer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions