| 20 | }).pipe(Effect.runPromise) |
| 21 | |
| 22 | const make = <R, E>(testLayer: Layer.Layer<R, E>, liveLayer: Layer.Layer<R, E>) => { |
| 23 | const effect = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 24 | test(name, () => run(value, testLayer), opts) |
| 25 | |
| 26 | effect.only = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 27 | test.only(name, () => run(value, testLayer), opts) |
| 28 | |
| 29 | effect.skip = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 30 | test.skip(name, () => run(value, testLayer), opts) |
| 31 | |
| 32 | const live = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 33 | test(name, () => run(value, liveLayer), opts) |
| 34 | |
| 35 | live.only = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 36 | test.only(name, () => run(value, liveLayer), opts) |
| 37 | |
| 38 | live.skip = <A, E2>(name: string, value: Body<A, E2, R | Scope.Scope>, opts?: number | TestOptions) => |
| 39 | test.skip(name, () => run(value, liveLayer), opts) |
| 40 | |
| 41 | return { effect, live } |
| 42 | } |
| 43 | |
| 44 | // Test environment with TestClock and TestConsole |
| 45 | const testEnv = Layer.mergeAll(TestConsole.layer, TestClock.layer()) |