UNPKG

defect-inspection-tools-mcp-server

Version:

Defect inspection tools server handling defect detection, analysis, and reporting with AI/ML capabilities for quality control

46 lines (37 loc) โ€ข 1.29 kB
#!/usr/bin/env node import { spawn } from 'child_process'; console.log('๐Ÿงช Testing Defect Inspection Tools MCP Server...\n'); const testCommands = [ 'node dist/index.js --help', 'echo "Server help command test completed"' ]; async function runTests() { for (const command of testCommands) { console.log(`Running: ${command}`); const [cmd, ...args] = command.split(' '); const child = spawn(cmd, args, { stdio: 'inherit', shell: true }); await new Promise((resolve, reject) => { child.on('exit', (code) => { if (code === 0) { console.log('โœ… Test passed\n'); resolve(); } else { console.log('โŒ Test failed\n'); reject(new Error(`Command failed with code ${code}`)); } }); child.on('error', (error) => { console.log('โŒ Test failed with error:', error.message); reject(error); }); }); } console.log('๐ŸŽ‰ All tests completed!'); } runTests().catch((error) => { console.error('Test suite failed:', error.message); process.exit(1); });