diff options
| author | Dax Raad <[email protected]> | 2025-05-30 20:47:56 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-30 20:48:36 -0400 |
| commit | f3da73553c45f17e04b1e77cb13eb0fca714d1bd (patch) | |
| tree | a24317a19e1ab2a89da50db669dc6894f15d00d1 /js/test | |
| parent | 9a26b3058ffc1023e5c7e54b6d571c903d15888e (diff) | |
| download | opencode-f3da73553c45f17e04b1e77cb13eb0fca714d1bd.tar.gz opencode-f3da73553c45f17e04b1e77cb13eb0fca714d1bd.zip | |
sync
Diffstat (limited to 'js/test')
| -rw-r--r-- | js/test/tool/__snapshots__/tool.test.ts.snap | 17 | ||||
| -rw-r--r-- | js/test/tool/tool.test.ts | 55 |
2 files changed, 0 insertions, 72 deletions
diff --git a/js/test/tool/__snapshots__/tool.test.ts.snap b/js/test/tool/__snapshots__/tool.test.ts.snap deleted file mode 100644 index 12669e387..000000000 --- a/js/test/tool/__snapshots__/tool.test.ts.snap +++ /dev/null @@ -1,17 +0,0 @@ -// Bun Snapshot v1, https://goo.gl/fbAQLP - -exports[`tool.ls basic 1`] = ` -"- /home/thdxr/dev/projects/sst/opencode/js/example/ - - home/ - - thdxr/ - - dev/ - - projects/ - - sst/ - - opencode/ - - js/ - - example/ - - ink.tsx - - broken.ts - - cli.ts -" -`; diff --git a/js/test/tool/tool.test.ts b/js/test/tool/tool.test.ts deleted file mode 100644 index 4b6d2efd3..000000000 --- a/js/test/tool/tool.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { describe, expect, test } from "bun:test"; -import { App } from "../../src/app/app"; -import { glob } from "../../src/tool/glob"; -import { ls } from "../../src/tool/ls"; - -describe("tool.glob", () => { - test("truncate", async () => { - await App.provide({ directory: process.cwd() }, async () => { - let result = await glob.execute( - { - pattern: "./node_modules/**/*", - }, - { - toolCallId: "test", - messages: [], - }, - ); - expect(result.metadata.truncated).toBe(true); - }); - }); - test("basic", async () => { - await App.provide({ directory: process.cwd() }, async () => { - let result = await glob.execute( - { - pattern: "*.json", - }, - { - toolCallId: "test", - messages: [], - }, - ); - expect(result.metadata).toMatchObject({ - truncated: false, - count: 2, - }); - }); - }); -}); - -describe("tool.ls", () => { - test("basic", async () => { - const result = await App.provide({ directory: process.cwd() }, async () => { - return await ls.execute( - { - path: "./example", - }, - { - toolCallId: "test", - messages: [], - }, - ); - }); - expect(result.output).toMatchSnapshot(); - }); -}); |
