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

Function source

apps/cloud/src/auth/mirror-feeders.node.test.ts:1623–1631  ·  view source on GitHub ↗
(orgs: ReadonlyMap<string, readonly FakeMembership[]>, userCalls: string[])

Source from the content-addressed store, hash-verified

1621describe("backfill", () => {
1622 /** A fake WorkOS holding `orgs` → members, counting `getUser` calls. */
1623 const source = (orgs: ReadonlyMap<string, readonly FakeMembership[]>, userCalls: string[]) => ({
1624 listOrganizationIds: () => Effect.succeed([...orgs.keys()]),
1625 listOrgMembers: (organizationId: string) => Effect.succeed(orgs.get(organizationId) ?? []),
1626 getUser: (userId: string) =>
1627 Effect.sync(() => {
1628 userCalls.push(userId);
1629 return workosUser(userId);
1630 }),
1631 });
1632
1633 const withMirror = <A, E>(body: (mirror: WorkOsMirrorShape) => Effect.Effect<A, E>) =>
1634 Effect.runPromise(

Callers 2

runBackfillFunction · 0.85

Calls 4

pushMethod · 0.80
workosUserFunction · 0.70
getMethod · 0.65
syncMethod · 0.65

Tested by

no test coverage detected