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

Function stubWorkOS

apps/cloud/src/org/handlers.test.ts:44–60  ·  view source on GitHub ↗
(overrides: StubOverrides = {})

Source from the content-addressed store, hash-verified

42}> {}
43
44const stubWorkOS = (overrides: StubOverrides = {}) =>
45 Layer.succeed(
46 WorkOSClient,
47 new Proxy({} as WorkOSClientService, {
48 get: (_target, prop) => {
49 if (typeof prop === "string" && prop in overrides) {
50 return overrides[prop as keyof StubOverrides];
51 }
52 return () =>
53 Effect.fail(
54 new UnstubbedWorkOSMethod({
55 method: typeof prop === "string" ? prop : (prop.description ?? "symbol"),
56 }),
57 );
58 },
59 }),
60 );
61
62const adminAuth = {
63 accountId: "user_admin",

Callers 2

provideFunction · 0.70
workosForCallerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected