@@ -2,7 +2,7 @@
|
2 | 2 | import path from "node:path"; |
3 | 3 | import { describe, expect, it } from "vitest"; |
4 | 4 | import { withEnv } from "../test-utils/env.js"; |
5 | | -import { formatToolAggregate, formatToolPrefix, shortenMeta, shortenPath } from "./tool-meta.js"; |
| 5 | +import { formatToolAggregate, shortenMeta } from "./tool-meta.js"; |
6 | 6 | |
7 | 7 | // Use path.resolve so inputs match the resolved HOME on every platform. |
8 | 8 | const home = path.resolve("/Users/test"); |
@@ -12,14 +12,6 @@ function withHome<T>(run: () => T): T {
|
12 | 12 | } |
13 | 13 | |
14 | 14 | describe("tool meta formatting", () => { |
15 | | -it("shortens paths under HOME", () => { |
16 | | -withHome(() => { |
17 | | -expect(shortenPath(home)).toBe("~"); |
18 | | -expect(shortenPath(`${home}/a/b.txt`)).toBe("~/a/b.txt"); |
19 | | -expect(shortenPath("/opt/x")).toBe("/opt/x"); |
20 | | -}); |
21 | | -}); |
22 | | - |
23 | 15 | it("shortens meta strings with optional colon suffix", () => { |
24 | 16 | withHome(() => { |
25 | 17 | expect(shortenMeta(`${home}/a.txt`)).toBe("~/a.txt"); |
@@ -64,11 +56,4 @@ describe("tool meta formatting", () => {
|
64 | 56 | expect(out).toBe("🛠️ elevated · `cd ~/dir && gemini 2>&1`"); |
65 | 57 | }); |
66 | 58 | }); |
67 | | - |
68 | | -it("formats prefixes with default labels", () => { |
69 | | -withHome(() => { |
70 | | -expect(formatToolPrefix(undefined, undefined)).toBe("🧩 Tool"); |
71 | | -expect(formatToolPrefix("x", `${home}/a.txt`)).toBe("🧩 X: ~/a.txt"); |
72 | | -}); |
73 | | -}); |
74 | 59 | }); |