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

Function workosForCaller

apps/cloud/src/org/handlers.test.ts:237–251  ·  view source on GitHub ↗
(deleted: string[])

Source from the content-addressed store, hash-verified

235// delete. `stubWorkOS` dies on anything else, so a `listUserMemberships` call
236// would fail the test — membership is never re-checked against WorkOS.
237const workosForCaller = (deleted: string[]) =>
238 stubWorkOS({
239 authenticateSealedSession: () =>
240 Effect.succeed({
241 userId: CALLER,
242 email: "caller@placeholder.test",
243 organizationId: ORG,
244 }),
245 getOrganizationDomain: () =>
246 Effect.succeed({ id: DOMAIN, organizationId: ORG, domain: "acme.test" }),
247 deleteOrganizationDomain: (domainId: string) =>
248 Effect.sync(() => {
249 deleted.push(domainId);
250 }),
251 });
252
253const orgApp = (role: "admin" | "member", workos: Layer.Layer<WorkOSClient>) => {
254 const rsLive = Layer.mergeAll(stubDb, stubUsers, stubDirectory(role), stubMirror);

Callers 1

deleteDomainFunction · 0.85

Calls 3

pushMethod · 0.80
stubWorkOSFunction · 0.70
syncMethod · 0.65

Tested by

no test coverage detected