TestOptions
Options for testAgent().
Properties
Section titled “Properties”expect?
Section titled “expect?”
optionalexpect?:object
Assertions to check against the run result.
costUnder?
Section titled “costUnder?”
optionalcostUnder?:number
Maximum acceptable cost in USD (requires guard.budget() middleware).
outputContains?
Section titled “outputContains?”
optionaloutputContains?:string
Substring that should appear in the text.
outputMatches?
Section titled “outputMatches?”
optionaloutputMatches?:RegExp
Regex the text should match.
toolsCalled?
Section titled “toolsCalled?”
optionaltoolsCalled?:string[]
Tool names that should have been called (requires observe.tools() middleware).
input:
string|string[]
User message(s). String for single turn, string[] for multi-turn session.