run_project_tests
Execute project test commands (e.g., npm test, yarn test) within the AI Development Pipeline MCP to validate code functionality and ensure integration readiness.
Instructions
Run project tests (npm test, yarn test, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- local-mcp-server.ts:167-182 (handler)The handler function for the 'run_project_tests' tool. It executes 'npm test' in the current working directory using child_process.exec and returns the stdout or formatted error message.async () => { return new Promise((resolve) => { exec('npm test', { cwd: process.cwd() }, (error, stdout, stderr) => { if (error) { resolve({ content: [{ type: 'text', text: `Test error: ${stderr || error.message}` }] }); } else { resolve({ content: [{ type: 'text', text: stdout }] }); } }); }); } );
- local-mcp-server.ts:163-182 (registration)Registration of the 'run_project_tests' MCP tool using McpServer.tool(), including description, empty input schema, and inline handler.server.tool( 'run_project_tests', 'Run project tests (npm test, yarn test, etc.)', {}, async () => { return new Promise((resolve) => { exec('npm test', { cwd: process.cwd() }, (error, stdout, stderr) => { if (error) { resolve({ content: [{ type: 'text', text: `Test error: ${stderr || error.message}` }] }); } else { resolve({ content: [{ type: 'text', text: stdout }] }); } }); }); } );