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

Function workosForCaller

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

Source from the content-addressed store, hash-verified

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