(table: string)
| 6 | const ClientLayer = PgliteClient.layer({}) |
| 7 | |
| 8 | const setup = (table: string) => |
| 9 | Effect.gen(function*() { |
| 10 | const sql = yield* PgliteClient.PgliteClient |
| 11 | yield* sql.unsafe(`CREATE TABLE IF NOT EXISTS ${table} (id SERIAL PRIMARY KEY, name TEXT)`) |
| 12 | yield* sql.unsafe(`TRUNCATE TABLE ${table} RESTART IDENTITY`) |
| 13 | return sql |
| 14 | }) |
| 15 | |
| 16 | describe("PgliteClient transactions", () => { |
| 17 | layer(ClientLayer, { timeout: "30 seconds" })((it) => { |