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

Function stubDirectory

apps/cloud/src/org/handlers.test.ts:173–182  ·  view source on GitHub ↗
(role: "admin" | "member")

Source from the content-addressed store, hash-verified

171
172const unread = (why: string) => () => Effect.die(why);
173const stubDirectory = (role: "admin" | "member") =>
174 Layer.succeed(MemberDirectory)({
175 membership: (accountId, organizationId) =>
176 Effect.succeed(accountId === CALLER && organizationId === ORG ? callerRow(role) : null),
177 membershipById: unread("the org plane does not look up by membership id"),
178 membershipsOf: unread("the org plane reads one membership, not the list"),
179 members: unread("the org plane does not list members"),
180 membersById: unread("the org plane does not batch members"),
181 findByEmail: unread("the org plane does not resolve emails"),
182 });
183
184const organizationRow = (id: string) => ({
185 id,

Callers 1

orgAppFunction · 0.70

Calls 2

callerRowFunction · 0.85
unreadFunction · 0.85

Tested by

no test coverage detected