Skip to content

Commit e9c8081

Browse files
committed
Add Agent Eval assertions on files
1 parent 9297d8e commit e9c8081

File tree

6 files changed

+242
-19
lines changed

6 files changed

+242
-19
lines changed

scripts/agent-evals/package-lock.json

Lines changed: 213 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/agent-evals/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@
1111
"author": "",
1212
"license": "ISC",
1313
"devDependencies": {
14+
"@types/chai": "^4.3.0",
15+
"@types/chai-fs": "^2.0.5",
1416
"@types/mocha": "^9.0.0",
15-
"@types/node": "^24.9.0"
17+
"@types/node": "^24.9.0",
18+
"chai-fs": "^2.0.0"
1619
},
1720
"dependencies": {
1821
"mocha": "^11.7.1",

scripts/agent-evals/src/runner/agent-test-runner.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ToolDef } from "./tool-matcher.js";
2+
import {Assertion} from "chai";
23

34
export interface AgentTestRunner {
45
/**
@@ -19,4 +20,10 @@ export interface AgentTestRunner {
1920
* an event is not found
2021
*/
2122
expectToolCalls(tools: ToolDef[]): Promise<void>;
23+
24+
/**
25+
* Returns an assertion object for the path inside the run directory that can
26+
* be asserted on via chai-fs's API: https://www.chaijs.com/plugins/chai-fs/
27+
*/
28+
expectFs(filePath: string): Chai.Assertion;
2229
}

0 commit comments

Comments
 (0)