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

Function stubWorkOS

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

Source from the content-addressed store, hash-verified

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