MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / callerThatThrows

Function callerThatThrows

sdk/src/impl/__tests__/prompt-result.test.ts:109–115  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

107 }
108
109 async function callerThatThrows() {
110 const result = await mockPromptAiSdk()
111 if (result.aborted) {
112 throw new Error(`Prompt aborted: ${result.reason}`)
113 }
114 return result.value
115 }
116
117 await expect(callerThatThrows()).rejects.toThrow('Prompt aborted: Request cancelled')
118 })

Callers 1

Calls 1

mockPromptAiSdkFunction · 0.85

Tested by

no test coverage detected