MCPcopy
hub / github.com/anomalyco/opencode / expectLLMError

Function expectLLMError

packages/llm/test/executor.test.ts:67–71  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

65}
66
67const expectLLMError = (error: unknown) => {
68 expect(error).toBeInstanceOf(LLMError)
69 if (!(error instanceof LLMError)) throw new Error("expected LLMError")
70 return error
71}
72
73const errorHttp = (error: LLMError) => ("http" in error.reason ? error.reason.http : undefined)
74

Callers 2

executor.test.tsFile · 0.85
failWithFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected