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

Function directoryWith

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

Source from the content-addressed store, hash-verified

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

Callers 1

reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected