Files
logpile/bible-local/09-testing.md
Michael Chus 78806f9fa0 Add shared bible submodule, rename local bible to bible-local
- Add bible.git as submodule at bible/
- Move docs/bible/ → bible-local/ (project-specific architecture)
- Update CLAUDE.md to reference both bible/ and bible-local/
- Add AGENTS.md for Codex with same structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 16:38:57 +03:00

1.2 KiB

09 — Testing

Required before merge

go test ./...

All tests must pass before any change is merged.

Where to add tests

Change area Test location
Collectors internal/collector/*_test.go
HTTP handlers internal/server/*_test.go
Exporters internal/exporter/*_test.go
Parsers internal/parser/vendors/<vendor>/*_test.go

Exporter tests

The Reanimator exporter has comprehensive coverage:

Test file Coverage
reanimator_converter_test.go Unit tests per conversion function
reanimator_integration_test.go Full export with realistic AnalysisResult

Run exporter tests only:

go test ./internal/exporter/...
go test ./internal/exporter/... -v -run Reanimator
go test ./internal/exporter/... -cover

Guidelines

  • Prefer table-driven tests for parsing logic (multiple input variants).
  • Do not rely on network access in unit tests.
  • Test both the happy path and edge cases (missing fields, empty collections).
  • When adding a new vendor parser, include at minimum:
    • Detect() test with a positive and a negative sample file list.
    • Parse() test with a minimal but representative archive.