Problem Statement
Currently, TestOutputParser in src/terminal_agent/verifier/runners.py has dedicated regex matchers for pytest and unittest. When verifying JavaScript/TypeScript projects (npm test, jest, vitest) or Go projects (go test ./...), it falls back to binary exit-code heuristics (1 passed, 0 failed on exit code 0; 0 passed, 1 failed on exit code > 0). This prevents accurate telemetry reporting on how many tests passed vs failed in non-Python projects.
Proposed Solution
Add dedicated parser methods to TestOutputParser:
- Jest / Vitest parser:
- Match:
Tests:\s+(\d+)\s+passed,\s+(\d+)\s+failed,\s+(\d+)\s+total
- Match:
Tests:\s+(\d+)\s+passed,\s+(\d+)\s+total
- Go test parser:
- Count lines matching
--- PASS: <TestName> and --- FAIL: <TestName>.
- Match summary lines
PASS / FAIL\s+<pkg>\s+[\d\.]+s.
Files to Modify
src/terminal_agent/verifier/runners.py
tests/unit/test_verifier.py
Acceptance Criteria
Problem Statement
Currently,
TestOutputParserinsrc/terminal_agent/verifier/runners.pyhas dedicated regex matchers forpytestandunittest. When verifying JavaScript/TypeScript projects (npm test,jest,vitest) or Go projects (go test ./...), it falls back to binary exit-code heuristics (1 passed, 0 failedon exit code 0;0 passed, 1 failedon exit code > 0). This prevents accurate telemetry reporting on how many tests passed vs failed in non-Python projects.Proposed Solution
Add dedicated parser methods to
TestOutputParser:Tests:\s+(\d+)\s+passed,\s+(\d+)\s+failed,\s+(\d+)\s+totalTests:\s+(\d+)\s+passed,\s+(\d+)\s+total--- PASS: <TestName>and--- FAIL: <TestName>.PASS/FAIL\s+<pkg>\s+[\d\.]+s.Files to Modify
src/terminal_agent/verifier/runners.pytests/unit/test_verifier.pyAcceptance Criteria
TestOutputParser.parse(jest_output, exit_code=0)accurately extracts passed, failed, and total test counts.TestOutputParser.parse(vitest_output, exit_code=1)extracts failed test counts and error totals.TestOutputParser.parse(go_test_output, exit_code=0)extracts passing test counts fromgo test -v.tests/unit/test_verifier.pycovering Jest, Vitest, and Go test output samples.