mcp-product-manager
Version:
MCP Orchestrator for task and project management with web interface
54 lines (46 loc) โข 1.52 kB
JavaScript
// 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');