← ClaudeAtlas

testinglisted

Comprehensive testing patterns and anti-patterns for writing and reviewing tests
fagemx/edda · ★ 34 · Testing & QA · score 78
Install: claude install-skill fagemx/edda
# Testing Skill Use this skill when writing tests, reviewing test code, or investigating test failures. ## Documentation Read the relevant reference based on context: | Context | Reference | |---------|-----------| | General testing | This document | | Anti-patterns | [Anti-Patterns](#anti-patterns) section below | | Patterns | [Patterns](#patterns) section below | | CLI testing (`edda-cli`) | [CLI Testing](#cli-testing) section below | | Bridge testing (`edda-bridge-claude`) | [Bridge Testing](#bridge-testing) section below | | Ledger testing (`edda-ledger`) | [Ledger Testing](#ledger-testing) section below | | Store testing (`edda-store`) | [Store Testing](#store-testing) section below | ## Key Principles 1. **Integration tests are primary** — test at system entry points (CLI commands, hook dispatch) 2. **Mock at the boundary** — only mock external services, not internal code 3. **Use real infrastructure** — real filesystem (tempdir), real ledger, real coordination log 4. **Test behavior, not implementation** — verify outcomes, not internal function calls ## Test Organization This project uses **inline tests** exclusively — zero `tests/` directories across all crates. ``` crates/edda-cli/ src/ cmd_bridge.rs # #[cfg(test)] mod tests { ... } cmd_gc.rs # #[cfg(test)] mod tests { ... } crates/edda-bridge-claude/ src/ dispatch.rs # #[cfg(test)] mod tests { ... } (40+ tests) peers.rs # #[cfg(test)] mod tests { ... }