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

Function freshOrg

apps/cloud/src/auth/workos-mirror.node.test.ts:95–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93// Every test mints its own org so the shared test database never couples
94// them; ids are synthetic placeholders, never real identities.
95const freshOrg = () =>
96 Effect.gen(function* () {
97 const id = `org_${crypto.randomUUID().replaceAll("-", "")}`;
98 const store = yield* UserStoreService;
99 yield* store.use("upsertOrganization", (s) =>
100 s.upsertOrganization({ id, name: "Mirror Org", updatedAt: T1 }),
101 );
102 return id;
103 });
104
105const user = (id: string, overrides: Partial<WorkOsMirrorUser> = {}): WorkOsMirrorUser => ({
106 id,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected