* Test basic search functionality
()
| 198 | * Test basic search functionality |
| 199 | */ |
| 200 | async function testBasicSearch() { |
| 201 | console.log(`${colors.yellow}Testing basic search functionality...${colors.reset}`); |
| 202 | |
| 203 | const { finalResult } = await searchAndWaitForCompletion({ |
| 204 | path: TEST_DIR, |
| 205 | pattern: 'pattern', |
| 206 | searchType: 'content' |
| 207 | }); |
| 208 | |
| 209 | assert(finalResult.content, 'Result should have content'); |
| 210 | assert(finalResult.content.length > 0, 'Content should not be empty'); |
| 211 | |
| 212 | const text = finalResult.content[0].text; |
| 213 | assert(text.includes('test1.js'), 'Should find matches in test1.js'); |
| 214 | assert(text.includes('test2.ts'), 'Should find matches in test2.ts'); |
| 215 | assert(text.includes('nested.py'), 'Should find matches in nested.py'); |
| 216 | |
| 217 | console.log(`${colors.green}✓ Basic search test passed${colors.reset}`); |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Test case-sensitive search |
no test coverage detected