(shouldAbort: boolean)
| 300 | describe('PromptResult integration patterns', () => { |
| 301 | describe('early return pattern', () => { |
| 302 | async function mockLlmCall(shouldAbort: boolean): Promise<PromptResult<string>> { |
| 303 | if (shouldAbort) { |
| 304 | return promptAborted('User cancelled') |
| 305 | } |
| 306 | return promptSuccess('LLM response') |
| 307 | } |
| 308 | |
| 309 | async function callerWithEarlyReturn(shouldAbort: boolean): Promise<string | null> { |
| 310 | const result = await mockLlmCall(shouldAbort) |
no test coverage detected