(methods: Partial<WorkOSClientService>)
| 185 | * fails the test instead of passing on a fake. |
| 186 | */ |
| 187 | const 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 | |
| 197 | describe("login callback", () => { |
| 198 | const callbackHandler = (workos: Layer.Layer<WorkOSClient>) => |
no outgoing calls
no test coverage detected