Skip to content

TestOptions

Options for testAgent().

optional expect?: object

Assertions to check against the run result.

optional costUnder?: number

Maximum acceptable cost in USD (requires guard.budget() middleware).

optional outputContains?: string

Substring that should appear in the text.

optional outputMatches?: RegExp

Regex the text should match.

optional toolsCalled?: 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.