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

Function stubWorkOS

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

Source from the content-addressed store, hash-verified

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

Callers 2

provideFunction · 0.70
workosForCallerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected