|
5 | 5 | // contents. These tests pin that wording and each matching rule it states, so |
6 | 6 | // the description cannot drift from the behavior again. |
7 | 7 | // |
8 | | -// They also pin the realistic example patterns the description carries next to |
9 | | -// the generic ones, and what an empty result says (#5553): a bare "No matches |
10 | | -// found" gave a model nothing to correct a pattern with, so it repeated |
| 8 | +// They also pin what an empty result says (#5553): a bare "No matches found" |
| 9 | +// gave a model nothing to correct a pattern with, so it repeated |
11 | 10 | // '*.ext' patterns that cannot reach a subdirectory. The empty result now |
12 | 11 | // names the pattern and the directory, restates how the pattern is read, and |
13 | 12 | // suggests the '**/' form when the pattern has no '**'. |
@@ -68,27 +67,6 @@ describe("search_files description (#896, #3419)", () => { |
68 | 67 | expect(description).not.toContain("working directory"); |
69 | 68 | }); |
70 | 69 |
|
71 | | - it("gives realistic example patterns, each of which matches as described", async () => { |
72 | | - const { tools } = await client.listTools(); |
73 | | - const tool = tools.find((t) => t.name === "search_files"); |
74 | | - expect(tool?.description).toContain("'**/*.json'"); |
75 | | - expect(tool?.description).toContain("'**/*report*'"); |
76 | | - const properties = tool?.inputSchema.properties as Record< |
77 | | - string, |
78 | | - { description?: string } |
79 | | - >; |
80 | | - expect(properties.pattern.description).toContain("'**/*report*'"); |
81 | | - |
82 | | - await fs.writeFile(path.join(dir, "src", "config", "app.json"), ""); |
83 | | - await fs.writeFile(path.join(dir, "src", "q3-report-final.txt"), ""); |
84 | | - expect(await search("**/*.json")).toEqual([ |
85 | | - path.join(dir, "src", "config", "app.json"), |
86 | | - ]); |
87 | | - expect(await search("**/*report*")).toEqual([ |
88 | | - path.join(dir, "src", "q3-report-final.txt"), |
89 | | - ]); |
90 | | - }); |
91 | | - |
92 | 70 | it("does not match a file's contents", async () => { |
93 | 71 | expect(await search("**/needle")).toEqual([ |
94 | 72 | `No matches found for pattern '**/needle' under ${dir}. ` + |
|
0 commit comments