import type { EvalVerdict } from '@mastra/core/evals'; /** * Custom Vitest matchers operating on a `RunEvalsResult` (the return value of * `runEvals`). Registered via `registerEvalMatchers()` or by adding * `@mastra/evals/vitest/setup` to `setupFiles`. */ export interface EvalMatchers { /** Asserts the run's verdict (`passed`, `scored`, or `failed`). */ toHaveVerdict(verdict: EvalVerdict): R; /** Asserts the average score of a scorer is strictly above `min`. Supports dot-paths for categorized configs (e.g. `agent.my-scorer`). */ toHaveScoreAbove(scorerName: string, min: number): R; /** Asserts the average score of a scorer is strictly below `max`. Supports dot-paths for categorized configs (e.g. `agent.my-scorer`). */ toHaveScoreBelow(scorerName: string, max: number): R; /** Asserts that all gates passed. Throws when there are no gate results, even under `.not`. */ toPassGates(): R; /** Asserts that all scorer thresholds passed. Throws when there are no threshold results, even under `.not`. */ toPassThresholds(): R; } declare global { namespace Chai { interface Assertion extends EvalMatchers { } } } declare module 'vitest' { interface AsymmetricMatchersContaining extends EvalMatchers { } } export declare const evalMatchers: { toHaveVerdict(received: unknown, verdict: EvalVerdict): { pass: boolean; message: () => string; }; toHaveScoreAbove(received: unknown, scorerName: string, min: number): { pass: boolean; message: () => string; }; toHaveScoreBelow(received: unknown, scorerName: string, max: number): { pass: boolean; message: () => string; }; toPassGates(received: unknown): { pass: boolean; message: () => string; }; toPassThresholds(received: unknown): { pass: boolean; message: () => string; }; }; /** Registers the Mastra eval matchers on Vitest's `expect`. */ export declare function registerEvalMatchers(): void; //# sourceMappingURL=matchers.d.ts.map