Skip to content

Commit a77f494

Browse files
committed
test: load oversized plugin fixture output as data
1 parent 0dc3dd7 commit a77f494

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎packages/cli/test/session/tool-guidance.test.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,9 +677,13 @@ describe("runtime hints through actual tool loop and next request (#244)", () =>
677677
{
678678
permission: { ...denied, read: "deny" },
679679
init: async (directory) => {
680+
await Bun.write(path.join(directory, "oversized-output.txt"), original)
680681
await Bun.write(
681682
path.join(directory, ".aictrl/tool/oversized.ts"),
682-
`export default { description: "Custom plugin fixture", args: {}, execute: async () => ${JSON.stringify(original)} }`,
683+
[
684+
'import { readFile } from "node:fs/promises"',
685+
'export default { description: "Custom plugin fixture", args: {}, execute: async () => readFile(new URL("../../oversized-output.txt", import.meta.url), "utf8") }',
686+
].join("\n"),
683687
)
684688
},
685689
call: () => ({ name: "oversized", arguments: {} }),

0 commit comments

Comments
 (0)