UNPKG

mcp-product-manager

Version:

MCP Orchestrator for task and project management with web interface

54 lines (46 loc) โ€ข 1.52 kB
#!/usr/bin/env node // test-project.js - Test that the product-manager project works independently import fs from 'fs'; import path from 'path'; console.log('๐Ÿงช Testing product-manager project...'); // Test 1: Check package.json exists and is valid try { const pkg = JSON.parse(fs.readFileSync('./package.json', 'utf8')); console.log('โœ… Package.json loaded:', pkg.name); } catch (err) { console.error('โŒ Package.json error:', err.message); process.exit(1); } // Test 2: Check main files exist const requiredFiles = [ './mcp-server.js', './rest-server.js', './coordination.db', './api/index.js' ]; for (const file of requiredFiles) { try { fs.accessSync(file); console.log('โœ… Required file exists:', file); } catch (err) { console.error('โŒ Missing required file:', file); process.exit(1); } } // Test 3: Check if we can connect to database (without loading heavy modules) try { const stats = fs.statSync('./coordination.db'); if (stats.size > 0) { console.log('โœ… Database file exists and has content'); } else { console.log('โš ๏ธ Database file exists but is empty'); } } catch (err) { console.error('โŒ Database file error:', err.message); process.exit(1); } console.log('๐ŸŽ‰ All basic tests passed! Project appears to be self-contained.'); console.log('\nTo run the project:'); console.log(' npm start - Start the orchestrator'); console.log(' npm run mcp - Run MCP server'); console.log(' npm run server - Run REST server');