mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-06 01:14:52 +01:00
more tools
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
import { App } from "../../src/app";
|
||||
import { glob } from "../../src/tool/glob";
|
||||
import { ls } from "../../src/tool/ls";
|
||||
|
||||
describe("tool.glob", () => {
|
||||
test("truncate", async () => {
|
||||
@@ -35,3 +36,20 @@ describe("tool.glob", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("tool.ls", () => {
|
||||
test("basic", async () => {
|
||||
const result = await App.provide({ directory: process.cwd() }, async () => {
|
||||
return await ls.execute(
|
||||
{
|
||||
path: ".",
|
||||
},
|
||||
{
|
||||
toolCallId: "test",
|
||||
messages: [],
|
||||
},
|
||||
);
|
||||
});
|
||||
expect(result.output).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user