MCPcopy Create free account
hub / github.com/Effect-TS/effect / setup

Function setup

packages/sql/pglite/test/Transaction.test.ts:8–14  ·  view source on GitHub ↗
(table: string)

Source from the content-addressed store, hash-verified

6const ClientLayer = PgliteClient.layer({})
7
8const 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
16describe("PgliteClient transactions", () => {
17 layer(ClientLayer, { timeout: "30 seconds" })((it) => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected