Test runner

From stevehuang0115/crewly · View interactive version

Test runner is an AI agent skill from the GitHub repository stevehuang0115/crewly. Detect the test framework and run tests with coverage reporting.

How to use this skill

Skill file

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

  1. vitest.config.ts/js -> Vitest
  2. jest.config.js/ts or package.json#jest -> Jest
  3. pytest.ini / pyproject.toml / setup.cfg -> pytest
  4. package.json#scripts.test content -> match framework name
  5. 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..."
}
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.