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

Function directoryWith

apps/cloud/src/auth/mirror-feeders.node.test.ts:1511–1535  ·  view source on GitHub ↗
(org: string, active: number)

Source from the content-addressed store, hash-verified

1509
1510 /** A directory holding `active` active members and one pending one. */
1511 const directoryWith = (org: string, active: number) =>
1512 Layer.succeed(MemberDirectory)({
1513 membership: () => Effect.die("the seat reporter lists, it does not look up"),
1514 membershipById: () => Effect.die("the seat reporter lists, it does not look up"),
1515 membershipsOf: () => Effect.die("the seat reporter lists, it does not look up"),
1516 membersById: () => Effect.die("the seat reporter lists, it does not look up"),
1517 findByEmail: () => Effect.die("the seat reporter lists, it does not look up"),
1518 members: (organizationId, query) => {
1519 expect(organizationId).toBe(org);
1520 expect(query?.statuses, "billed seats are active members only").toEqual(["active"]);
1521 return Effect.succeed(
1522 Array.from({ length: active }, (_, i) => ({
1523 accountId: `user_${i}`,
1524 membershipId: `om_${i}`,
1525 organizationId,
1526 email: null,
1527 name: null,
1528 avatarUrl: null,
1529 role: "member",
1530 status: "active" as const,
1531 lastActiveAt: null,
1532 })),
1533 );
1534 },
1535 });
1536
1537 const report = (
1538 org: string,

Callers 1

reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected