Run npm script with structured output
npm_runRuns npm scripts such as test or lint and parses Vitest/Jest output into structured per-file pass/fail results, falling back to raw output for non-test scripts.
Instructions
Runs any npm script (test, lint, etc.) and parses Vitest/Jest output into structured pass/fail results per file. Falls back to raw output for non-test scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Extra environment variables | |
| args | No | Extra args passed after --, e.g. ['--coverage', '--verbose'] | |
| script | Yes | npm script name to run, e.g. 'test', 'lint', 'test:unit' | |
| project_dir | Yes | Absolute path to the project root | |
| timeout_seconds | No |