Documentation
¶
Overview ¶
Command sync-fixtures captures the upstream lowlighter/metrics output for a given test case (e.g. octocat) and writes the JSON to tests/fixtures/upstream/<login>.json. The captured fixture is the source of truth for the SC-001 / FR-018 upstream-compatibility test.
Approach:
- Read the requested input from ./org_repo/tests/cases/<login>.yml (the upstream maintains canonical test inputs there).
- Spawn the upstream Node test runner (`npm test --silent -- --grep "<login>"`) inside ./org_repo to materialize a metrics.json output. Cache the captured file under tests/fixtures/upstream/.
Exit codes:
0 fixture written (or absent-but-soft-skipped) 1 invocation / I/O error 2 org_repo missing — soft skip path (CI without the upstream checkout simply does not regenerate the fixture)
The companion test in tests/compatibility/json_test.go gracefully skips when the fixture is absent.