MCPcopy Create free account
hub / github.com/wonderwhy-er/DesktopCommanderMCP / testFileSearch

Function testFileSearch

test/test-search-code.js:472–485  ·  view source on GitHub ↗

* Test file search functionality

()

Source from the content-addressed store, hash-verified

470 * Test file search functionality
471 */
472async function testFileSearch() {
473 console.log(`${colors.yellow}Testing file search functionality...${colors.reset}`);
474
475 const { finalResult } = await searchAndWaitForCompletion({
476 path: TEST_DIR,
477 pattern: '*.js',
478 searchType: 'files'
479 });
480
481 const text = finalResult.content[0].text;
482 assert(text.includes('test1.js'), 'Should find JavaScript files');
483
484 console.log(`${colors.green}✓ File search test passed${colors.reset}`);
485}
486
487/**
488 * Main test runner function

Callers 1

testSearchCodeFunction · 0.85

Calls 3

logMethod · 0.80
assertFunction · 0.70

Tested by

no test coverage detected