run_project_tests
Execute project test suites (npm test, yarn test) to validate code functionality and identify issues during development.
Instructions
Run project tests (npm test, yarn test, etc.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- local-mcp-server.ts:163-182 (handler)The complete inline implementation of the 'run_project_tests' tool handler. It registers the tool with no input parameters and executes 'npm test' using child_process.exec, returning the stdout or error message in MCP content format.
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 }] }); } }); }); } ); - local-mcp-server.ts:166-166 (schema)Empty schema indicating the tool takes no input parameters.
{}, - local-mcp-server.ts:163-163 (registration)Registration of the 'run_project_tests' tool using McpServer.tool method.
server.tool(