Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 213 additions & 16 deletions scripts/agent-evals/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion scripts/agent-evals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/chai-fs": "^2.0.5",
"@types/mocha": "^9.0.0",
"@types/node": "^24.9.0"
"@types/node": "^24.9.0",
"chai-fs": "^2.0.0"
},
"dependencies": {
"mocha": "^11.7.1",
Expand Down
6 changes: 6 additions & 0 deletions scripts/agent-evals/src/runner/agent-test-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,10 @@ export interface AgentTestRunner {
* an event is not found
*/
expectToolCalls(tools: ToolDef[]): Promise<void>;

/**
* Returns an assertion object for the path inside the run directory that can
* be asserted on via chai-fs's API: https://www.chaijs.com/plugins/chai-fs/
*/
expectFs(filePath: string): Chai.Assertion;
}
10 changes: 10 additions & 0 deletions scripts/agent-evals/src/runner/expect-files.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import * as chai from "chai";
import chaiFs from "chai-fs";

// Prevent file paths in assertions from being cut off
chai.config.truncateThreshold = 0;
chai.use(chaiFs);

Check warning on line 6 in scripts/agent-evals/src/runner/expect-files.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `ChaiPlugin`

export function expectFile(path: string): Chai.Assertion {

Check warning on line 8 in scripts/agent-evals/src/runner/expect-files.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
return chai.expect(path);
}
Loading
Loading