(f: (directory: string) => Effect.Effect<A, E, R>)
| 27 | } |
| 28 | |
| 29 | function withTmp<A, E, R>(f: (directory: string) => Effect.Effect<A, E, R>) { |
| 30 | return Effect.acquireRelease( |
| 31 | Effect.promise(() => tmpdir()), |
| 32 | (tmp) => Effect.promise(() => tmp[Symbol.asyncDispose]()), |
| 33 | ).pipe(Effect.flatMap((tmp) => f(tmp.path))) |
| 34 | } |
| 35 | |
| 36 | describe("FileMutation", () => { |
| 37 | it.live("writes an existing internal file and returns a stable result", () => |
no test coverage detected