Test Runner
Detect the project's test framework (Jest, Vitest, pytest, Mocha) and run tests with optional coverage reporting. Returns a summary of test results.
Parameters
| Parameter | Required | Description |
|-----------|----------|-------------|
| projectPath | No | Path to the project (defaults to .) |
| pattern | No | Test path pattern to filter which tests to run |
| coverage | No | Set to true to generate coverage report |
| framework | No | Force a specific framework: jest, vitest, pytest, mocha |
Auto-Detection Order
vitest.config.ts/js-> Vitestjest.config.js/tsorpackage.json#jest-> Jestpytest.ini/pyproject.toml/setup.cfg-> pytestpackage.json#scripts.testcontent -> match framework name- Falls back to
npm test
Examples
Run all tests with auto-detection
bash config/skills/agent/test-runner/execute.sh '{"projectPath":"."}'
Run specific tests with coverage
bash config/skills/agent/test-runner/execute.sh '{"projectPath":".","pattern":"src/services/","coverage":true}'
Force Jest framework
bash config/skills/agent/test-runner/execute.sh '{"framework":"jest","pattern":"auth"}'
Output
{
"framework": "jest",
"command": "npx jest --forceExit",
"exitCode": 0,
"passed": true,
"summary": "Tests: 42 passed, 42 total..."
}