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

Function workosAnswering

apps/cloud/src/auth/v2-moved.test.ts:143–152  ·  view source on GitHub ↗
(answer: (organizationId: string) => Effect.Effect<unknown, unknown>)

Source from the content-addressed store, hash-verified

141describe("v2 moved live read", () => {
142 /** WorkOS answering `getOrganization` with `answer`; every other call dies. */
143 const workosAnswering = (answer: (organizationId: string) => Effect.Effect<unknown, unknown>) =>
144 Layer.succeed(
145 WorkOSClient,
146 new Proxy({} as WorkOSClientService, {
147 get: (_target, prop) =>
148 prop === "getOrganization"
149 ? answer
150 : () => Effect.die(`unexpected WorkOSClient.${String(prop)} call`),
151 }),
152 );
153
154 const organization = (metadata: Record<string, string>) => ({
155 object: "organization",

Callers 1

v2-moved.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected