-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for returning files from custom columns
- Loading branch information
1 parent
7734024
commit 6972314
Showing
3 changed files
with
97 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
packages/evalite-tests/tests/fixtures/files/files-4.eval.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { evalite } from "evalite"; | ||
import { reportTrace } from "evalite/traces"; | ||
import { readFileSync } from "node:fs"; | ||
import path from "node:path"; | ||
|
||
evalite("FilesWithColumns", { | ||
data: () => { | ||
return [ | ||
{ | ||
input: "abc", | ||
expected: "abcdef", | ||
}, | ||
]; | ||
}, | ||
task: async (input) => { | ||
return input + "def"; | ||
}, | ||
scorers: [], | ||
experimental_customColumns: () => { | ||
return [ | ||
{ | ||
label: "Column", | ||
value: readFileSync(path.join(import.meta.dirname, "test.png")), | ||
}, | ||
]; | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters