summaryrefslogtreecommitdiffhomepage
path: root/js/test
diff options
context:
space:
mode:
Diffstat (limited to 'js/test')
-rw-r--r--js/test/tool/__snapshots__/tool.test.ts.snap17
-rw-r--r--js/test/tool/tool.test.ts55
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();
- });
-});