ADR 0005: @arachnejs/testing harness
- Status: Accepted
- Date: 2026-09-27
- Deciders: Arachne core
Context #
Packages need shared test helpers without pulling Playwright, Testcontainers, or DB drivers into every unit test.
Decision #
Phase 0 ships a thin @arachnejs/testing with:
createTestApp— boots@arachnejs/coremodules and returns{ app, container, bus, dispose }with automatic dispose.factory— typed object factory with overrides and sequences.tempDir— creates and cleans a temporary directory.waitFor— polling helper for async conditions.mockLogger— capturingLoggerfor assertions.
Later phases extend this package (DB fixtures, render helpers, Playwright fixtures) without breaking these primitives. Optional peer deps are declared when those helpers land.
Depends on @arachnejs/core only.
Alternatives considered #
- Per-package ad-hoc helpers — duplication and drift.
- Full harness in Phase 0 — premature; no server/DB yet.
Consequences #
- Unit tests across packages share one harness API.
- Coverage of testing helpers themselves is required (≥ 80%).