← ClaudeAtlas

craft-testlisted

Testing philosophy. Confidence, not coverage. What to test, what to skip.
attac-t/the-foundry · ★ 1 · Testing & QA · score 57
Install: claude install-skill attac-t/the-foundry
# Skill: Craft Test > "Tests are confidence. Red to Green to Refactor." ## The Philosophy Tests exist to give you confidence to change code. They are not a bureaucratic checkbox. **The Question**: "If this breaks, will a test catch it?" ## What to Test | Test This | Because | |-----------|---------| | Business logic with decisions | Logic branches can fail | | Complex validation rules | Edge cases hide bugs | | Happy path + one error path | Proves it works and fails correctly | | Integration points | Boundaries are where bugs live | ## What to Skip | Skip This | Because | |-----------|---------| | Simple wrappers with no logic | Nothing can break | | Framework internals | The framework is already tested | | Every edge case | Diminishing returns | | Implementation details | Tests become brittle | ## The Structure Every test follows Arrange-Act-Assert: 1. **Arrange**: Set up the preconditions 2. **Act**: Execute the behavior 3. **Assert**: Verify the outcome Keep this structure explicit. A reader should identify each section instantly. ## Changing a rule finds its old tests first **A behaviour change is a search before it is an edit.** Every test that asserted the old rule is now wrong, and each one is a claim about how the thing works. Find them, and for each decide: does it prove the new rule, or was it proving the fault? Running the suite finds them too, and later, after the commit message is written and the reasoning has moved on. The search costs a minute.