@@ -115,38 +115,38 @@ describe('GrepTool', () => {
115
115
const params : GrepToolParams = { pattern : 'world' } ;
116
116
const result = await grepTool . execute ( params , abortSignal ) ;
117
117
expect ( result . llmContent ) . toContain (
118
- 'Found 3 match(es) for pattern "world" in path "."' ,
118
+ 'Found 3 matches for pattern "world" in path "."' ,
119
119
) ;
120
120
expect ( result . llmContent ) . toContain ( 'File: fileA.txt' ) ;
121
121
expect ( result . llmContent ) . toContain ( 'L1: hello world' ) ;
122
122
expect ( result . llmContent ) . toContain ( 'L2: second line with world' ) ;
123
123
expect ( result . llmContent ) . toContain ( 'File: sub/fileC.txt' ) ;
124
124
expect ( result . llmContent ) . toContain ( 'L1: another world in sub dir' ) ;
125
- expect ( result . returnDisplay ) . toBe ( 'Found 3 matche(s) ' ) ;
125
+ expect ( result . returnDisplay ) . toBe ( 'Found 3 matches ' ) ;
126
126
} ) ;
127
127
128
128
it ( 'should find matches in a specific path' , async ( ) => {
129
129
const params : GrepToolParams = { pattern : 'world' , path : 'sub' } ;
130
130
const result = await grepTool . execute ( params , abortSignal ) ;
131
131
expect ( result . llmContent ) . toContain (
132
- 'Found 1 match(es) for pattern "world" in path "sub"' ,
132
+ 'Found 1 match for pattern "world" in path "sub"' ,
133
133
) ;
134
134
expect ( result . llmContent ) . toContain ( 'File: fileC.txt' ) ; // Path relative to 'sub'
135
135
expect ( result . llmContent ) . toContain ( 'L1: another world in sub dir' ) ;
136
- expect ( result . returnDisplay ) . toBe ( 'Found 1 matche(s) ' ) ;
136
+ expect ( result . returnDisplay ) . toBe ( 'Found 1 match ' ) ;
137
137
} ) ;
138
138
139
139
it ( 'should find matches with an include glob' , async ( ) => {
140
140
const params : GrepToolParams = { pattern : 'hello' , include : '*.js' } ;
141
141
const result = await grepTool . execute ( params , abortSignal ) ;
142
142
expect ( result . llmContent ) . toContain (
143
- 'Found 1 match(es) for pattern "hello" in path "." (filter: "*.js")' ,
143
+ 'Found 1 match for pattern "hello" in path "." (filter: "*.js")' ,
144
144
) ;
145
145
expect ( result . llmContent ) . toContain ( 'File: fileB.js' ) ;
146
146
expect ( result . llmContent ) . toContain (
147
147
'L2: function baz() { return "hello"; }' ,
148
148
) ;
149
- expect ( result . returnDisplay ) . toBe ( 'Found 1 matche(s) ' ) ;
149
+ expect ( result . returnDisplay ) . toBe ( 'Found 1 match ' ) ;
150
150
} ) ;
151
151
152
152
it ( 'should find matches with an include glob and path' , async ( ) => {
@@ -161,11 +161,11 @@ describe('GrepTool', () => {
161
161
} ;
162
162
const result = await grepTool . execute ( params , abortSignal ) ;
163
163
expect ( result . llmContent ) . toContain (
164
- 'Found 1 match(es) for pattern "hello" in path "sub" (filter: "*.js")' ,
164
+ 'Found 1 match for pattern "hello" in path "sub" (filter: "*.js")' ,
165
165
) ;
166
166
expect ( result . llmContent ) . toContain ( 'File: another.js' ) ;
167
167
expect ( result . llmContent ) . toContain ( 'L1: const greeting = "hello";' ) ;
168
- expect ( result . returnDisplay ) . toBe ( 'Found 1 matche(s) ' ) ;
168
+ expect ( result . returnDisplay ) . toBe ( 'Found 1 match ' ) ;
169
169
} ) ;
170
170
171
171
it ( 'should return "No matches found" when pattern does not exist' , async ( ) => {
@@ -181,7 +181,7 @@ describe('GrepTool', () => {
181
181
const params : GrepToolParams = { pattern : 'foo.*bar' } ; // Matches 'const foo = "bar";'
182
182
const result = await grepTool . execute ( params , abortSignal ) ;
183
183
expect ( result . llmContent ) . toContain (
184
- 'Found 1 match(es) for pattern "foo.*bar" in path "."' ,
184
+ 'Found 1 match for pattern "foo.*bar" in path "."' ,
185
185
) ;
186
186
expect ( result . llmContent ) . toContain ( 'File: fileB.js' ) ;
187
187
expect ( result . llmContent ) . toContain ( 'L1: const foo = "bar";' ) ;
@@ -191,7 +191,7 @@ describe('GrepTool', () => {
191
191
const params : GrepToolParams = { pattern : 'HELLO' } ;
192
192
const result = await grepTool . execute ( params , abortSignal ) ;
193
193
expect ( result . llmContent ) . toContain (
194
- 'Found 2 match(es) for pattern "HELLO" in path "."' ,
194
+ 'Found 2 matches for pattern "HELLO" in path "."' ,
195
195
) ;
196
196
expect ( result . llmContent ) . toContain ( 'File: fileA.txt' ) ;
197
197
expect ( result . llmContent ) . toContain ( 'L1: hello world' ) ;
0 commit comments