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

Function stubWorkOS

apps/cloud/src/auth/org-api-key-mint.node.test.ts:39–49  ·  view source on GitHub ↗
(overrides: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

37});
38
39const stubWorkOS = (overrides: Record<string, unknown> = {}) =>
40 Layer.succeed(
41 WorkOSClient,
42 new Proxy({} as WorkOSClientService, {
43 get: (_target, prop) => {
44 const override = overrides[String(prop)];
45 if (override) return override;
46 return () => Effect.die(`unexpected WorkOSClient.${String(prop)} call`);
47 },
48 }),
49 );
50
51const serviceWith = (overrides: Record<string, unknown>) =>
52 ApiKeyService.asEffect().pipe(

Callers 1

serviceWithFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected