swift-testing
Installation
SKILL.md
Swift Testing
Tests prove observable contracts. Coverage is supporting structural evidence, not behavioral equivalence.
Test design
- Name the source test, contract, defect, risk, or incident protected by each test.
- Assert values, typed errors, ordering, state transitions, side effects, bytes, cleanup, and public lifecycle behavior.
- Prefer real values and controlled fakes at owned boundaries. Mock only expensive or nondeterministic collaborators.
- Preserve every parameterized source case identity during migrations even when Swift groups cases in one test declaration.
- For async tests, use expectations, continuations, clocks, or event-driven hooks with bounded timeouts; avoid fixed sleeps.
- Reuse one conformance suite across adapters, then add adapter-native failure and lifecycle cases.
- Test every claimed platform or condition in CI; conditional compilation is part of the behavioral surface.