From dc356ae1c21b6ae40948096db464161a25104325 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 22 Feb 2026 12:27:55 +0000 Subject: [PATCH] test: remove duplicate workspace path-resolution case --- ...aliases-schemas-without-dropping-f.test.ts | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-f.test.ts b/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-f.test.ts index 8265ccb571a..c1aba0b928e 100644 --- a/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-f.test.ts +++ b/src/agents/pi-tools.create-openclaw-coding-tools.adds-claude-style-aliases-schemas-without-dropping-f.test.ts @@ -7,44 +7,6 @@ import { createOpenClawCodingTools } from "./pi-tools.js"; import { expectReadWriteEditTools } from "./test-helpers/pi-tools-fs-helpers.js"; describe("createOpenClawCodingTools", () => { - it("uses workspaceDir for read/write/edit path resolution", async () => { - const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-ws-")); - try { - const tools = createOpenClawCodingTools({ workspaceDir: tmpDir }); - const { readTool, writeTool, editTool } = expectReadWriteEditTools(tools); - - const readPath = "test-workspace-file.txt"; - const readContent = "workspace path resolution test"; - await fs.writeFile(path.join(tmpDir, readPath), readContent, "utf8"); - const readResult = await readTool?.execute("tool-ws-1", { - path: readPath, - }); - const textBlocks = readResult?.content?.filter((block) => block.type === "text") as - | Array<{ text?: string }> - | undefined; - const combinedText = textBlocks?.map((block) => block.text ?? "").join("\n"); - expect(combinedText).toContain(readContent); - - const writePath = "test-write-file.txt"; - const writeContent = "written via workspace path"; - await writeTool?.execute("tool-ws-2", { - path: writePath, - content: writeContent, - }); - expect(await fs.readFile(path.join(tmpDir, writePath), "utf8")).toBe(writeContent); - - const editPath = "test-edit-file.txt"; - await fs.writeFile(path.join(tmpDir, editPath), "hello world", "utf8"); - await editTool?.execute("tool-ws-3", { - path: editPath, - oldText: "world", - newText: "universe", - }); - expect(await fs.readFile(path.join(tmpDir, editPath), "utf8")).toBe("hello universe"); - } finally { - await fs.rm(tmpDir, { recursive: true, force: true }); - } - }); it("accepts Claude Code parameter aliases for read/write/edit", async () => { const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-alias-")); try {