( body: (db: SqliteTestFumaDb) => Effect.Effect<A, E, Scope.Scope>, )
| 81 | // The bodies below acquire a scoped web handler, so `R` carries `Scope` rather |
| 82 | // than being erased; `Effect.scoped` closes it when the body finishes. |
| 83 | const withDb = <A, E>( |
| 84 | body: (db: SqliteTestFumaDb) => Effect.Effect<A, E, Scope.Scope>, |
| 85 | ): Effect.Effect<A, E> => |
| 86 | Effect.scoped( |
| 87 | Effect.acquireUseRelease( |
| 88 | Effect.promise(() => createSqliteTestFumaDb({ tables: collectTables() })), |
| 89 | body, |
| 90 | (db) => Effect.promise(() => db.close()), |
| 91 | ), |
| 92 | ); |
| 93 | |
| 94 | const insertConnection = ( |
| 95 | db: SqliteTestFumaDb, |
no test coverage detected