succeed — resolves with a successful real ChatResult carrying content
(and optionally a specific usage / reported model / thinking text).
fail — DRIVER-style failure: resolves with ChatResult{success:false}
whose errorInfo is built by the REAL ErrorAnalyzer from error, exactly
how production drivers report provider errors (the historical failover bug
class — failover must trigger off the returned result, not just exceptions).
failResult — resolves with a test-supplied failed ChatResult verbatim,
for cases where the test controls errorInfo (including leaving it absent).
throw — SDK-style failure: the returned promise rejects with error.
hang — never settles; models a hung provider socket (timeout tests).
hangUntilAborted — waits like a real SDK call until the request's
cancellationToken aborts, then rejects with an AbortError, which
BaseLLM reports as a cancelled result. onStart runs when the call begins,
so a test can abort at a known moment.
stream — streams chunks through the real BaseLLM streaming template
method when the caller requested streaming; in a non-streaming call the
chunks resolve joined as one successful result.
One scripted per-call outcome for TestLLM.Script.
succeed— resolves with a successful realChatResultcarryingcontent(and optionally a specific usage / reported model / thinking text).fail— DRIVER-style failure: resolves withChatResult{success:false}whoseerrorInfois built by the REALErrorAnalyzerfromerror, exactly how production drivers report provider errors (the historical failover bug class — failover must trigger off the returned result, not just exceptions).failResult— resolves with a test-supplied failedChatResultverbatim, for cases where the test controlserrorInfo(including leaving it absent).throw— SDK-style failure: the returned promise rejects witherror.hang— never settles; models a hung provider socket (timeout tests).hangUntilAborted— waits like a real SDK call until the request'scancellationTokenaborts, then rejects with anAbortError, which BaseLLM reports as a cancelled result.onStartruns when the call begins, so a test can abort at a known moment.stream— streamschunksthrough the real BaseLLM streaming template method when the caller requested streaming; in a non-streaming call the chunks resolve joined as one successful result.