( body: (db: SqliteTestFumaDb) => Effect.Effect<A, E, Scope.Scope>, )
| 89 | // The bodies below acquire a scoped web handler, so `R` carries `Scope` rather |
| 90 | // than being erased; `Effect.scoped` closes it when the body finishes. |
| 91 | const withDb = <A, E>( |
| 92 | body: (db: SqliteTestFumaDb) => Effect.Effect<A, E, Scope.Scope>, |
| 93 | ): Effect.Effect<A, E> => |
| 94 | Effect.scoped( |
| 95 | Effect.acquireUseRelease( |
| 96 | Effect.promise(() => createSqliteTestFumaDb({ tables: collectTables() })), |
| 97 | body, |
| 98 | (db) => Effect.promise(() => db.close()), |
| 99 | ), |
| 100 | ); |
| 101 | |
| 102 | const insertConnection = ( |
| 103 | db: SqliteTestFumaDb, |
no test coverage detected