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

Function stubWorkOS

apps/cloud/src/auth/workos-events-sync.node.test.ts:180–188  ·  view source on GitHub ↗
(methods: Partial<WorkOSClientService>)

Source from the content-addressed store, hash-verified

178 * read fails the test instead of passing on a fake.
179 */
180const stubWorkOS = (methods: Partial<WorkOSClientService>) =>
181 Layer.succeed(
182 WorkOSClient,
183 new Proxy({} as WorkOSClientService, {
184 get: (_target, prop) =>
185 (methods as Record<PropertyKey, unknown>)[prop] ??
186 (() => Effect.die(`unexpected WorkOSClient.${String(prop)} call`)),
187 }),
188 );
189
190/**
191 * `getUser` for every member a test's membership events name: the

Callers 3

runFunction · 0.70
eventsApiFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected