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

Function stubWorkOS

apps/cloud/src/auth/mirror-feeders.node.test.ts:187–195  ·  view source on GitHub ↗
(methods: Partial<WorkOSClientService>)

Source from the content-addressed store, hash-verified

185 * fails the test instead of passing on a fake.
186 */
187const stubWorkOS = (methods: Partial<WorkOSClientService>) =>
188 Layer.succeed(
189 WorkOSClient,
190 new Proxy({} as WorkOSClientService, {
191 get: (_target, prop) =>
192 (methods as Record<PropertyKey, unknown>)[prop] ??
193 (() => Effect.die(`unexpected WorkOSClient.${String(prop)} call`)),
194 }),
195 );
196
197describe("login callback", () => {
198 const callbackHandler = (workos: Layer.Layer<WorkOSClient>) =>

Callers 6

signInFunction · 0.70
sessionHandlerFunction · 0.70
authorizeFunction · 0.70
providerLayerFunction · 0.70
reportFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected