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

Function upsert

apps/cloud/src/db/db.test.ts:124–130  ·  view source on GitHub ↗
(org: { id: string; name: string })

Source from the content-addressed store, hash-verified

122
123describe("upsertOrganization · slug is minted at insert", () => {
124 const upsert = (org: { id: string; name: string }) =>
125 program(
126 Effect.gen(function* () {
127 const { db } = yield* DbService;
128 return yield* Effect.promise(() => makeUserStore(db).upsertOrganization(org));
129 }),
130 );
131
132 it("mints a valid slug on insert", async () => {
133 const org = await upsert({ id: `org_${crypto.randomUUID()}`, name: "Slug Mint Co" });

Callers 1

db.test.tsFile · 0.70

Calls 2

makeUserStoreFunction · 0.90
programFunction · 0.70

Tested by

no test coverage detected