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

Function testBinaryFiles

test/test-search-code-edge-cases.js:211–226  ·  view source on GitHub ↗

* Test binary files handling

()

Source from the content-addressed store, hash-verified

209 * Test binary files handling
210 */
211async function testBinaryFiles() {
212 console.log(`${colors.yellow}Testing binary files handling...${colors.reset}`);
213
214 const { finalResult } = await searchAndWaitForCompletion({
215 path: EDGE_CASE_TEST_DIR,
216 pattern: 'pattern',
217 searchType: 'content'
218 });
219
220 const text = finalResult.content[0].text;
221 // Binary files should either be ignored or handled gracefully
222 // Should not crash the search
223 assert(typeof text === 'string', 'Should return string result even with binary files present');
224
225 console.log(`${colors.green}✓ Binary files test passed${colors.reset}`);
226}
227
228/**
229 * Test large file performance

Callers 1

testSearchCodeEdgeCasesFunction · 0.85

Calls 3

logMethod · 0.80
assertFunction · 0.70

Tested by

no test coverage detected