MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / upsert

Function upsert

apps/cloud/src/db/db.test.ts:128–139  ·  view source on GitHub ↗
(org: { id: string; name: string; updatedAt?: Date })

Source from the content-addressed store, hash-verified

126
127describe("upsertOrganization · slug is minted at insert", () => {
128 const upsert = (org: { id: string; name: string; updatedAt?: Date }) =>
129 program(
130 Effect.gen(function* () {
131 const { db } = yield* DbService;
132 return yield* Effect.promise(() =>
133 makeUserStore(db).upsertOrganization({
134 updatedAt: new Date(),
135 ...org,
136 }),
137 );
138 }),
139 );
140
141 it("mints a valid slug on insert", async () => {
142 const org = await upsert({

Callers 1

db.test.tsFile · 0.70

Calls 2

makeUserStoreFunction · 0.90
programFunction · 0.70

Tested by

no test coverage detected