From maverick
Enforces Maverick's testing standards: behaviour-over-implementation unit tests, boundary-only mocking, 60% unit-coverage CI gate, and critical-path integration coverage with a no-decrease ratchet. Applied when writing or reviewing tests.
How this skill is triggered — by the user, by Claude, or both
Slash command
/maverick:mav-bp-testingThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Unit and integration testing as one discipline. Unit tests verify
Unit and integration testing as one discipline. Unit tests verify behaviour in isolation; integration tests verify real wiring across boundaries. Together they are the only automated evidence that generated code actually works.
Unit tests
Integration tests
Coverage (enforced, not aspirational)
Check docs/maverick/skills/unit-testing/SKILL.md and
docs/maverick/skills/integration-testing/SKILL.md for the project's
framework, conventions, and extra requirements. If present, they win on
specifics. If missing, proceed with these standards and note the gap in
your summary — do not trigger skill generation mid-task.
| Pattern | Issue | Fix |
|---|---|---|
| Test with no assertions | False confidence | Add meaningful assertions |
| Mocking internal modules | Brittle tests | Mock at boundaries only |
| Test name describes implementation | Couples to internals | Describe behaviour instead |
| Shared mutable state between tests | Test pollution | Use beforeEach/factory functions |
| Test catches and swallows errors | Hidden failures | Let errors propagate or assert on them |
| >3 mocks in one test | Unit has too many dependencies | Refactor the unit's design |
| Test duplicates implementation logic | Tautological test | Assert on outputs, not reimplemented logic |
| Commented-out tests | Dead tests hiding failures | Delete or fix |
| Test hits production service | Side effects and flakiness | Use container, sandbox, or stub |
| No cleanup after test | Data leaks between tests | Add teardown or transaction rollback |
| Sleep-based waits for dependencies | Flaky timing | Health-check polling with timeout |
| Integration test duplicates unit coverage | Wasted execution time | Delete and rely on the unit test |
| No timeout set | Hanging test blocks CI | Set explicit per-test timeout |
| Hard-coded connection strings | Breaks across environments | Use environment variables or config |
| Test requires manual environment setup | Not reproducible | Automate with containers or scripts |
npx claudepluginhub thermiteau/maverick --plugin maverickReviews test code for common maintenance issues like mock-heavy tests, duplicate bodies, and framework-verification. Supports pytest, Jest, Vitest, and PHPUnit.
Generates test suites with unit, integration, and e2e tests, proper mocking strategies, and edge case coverage. Works with any language/framework.
Creates unit and integration tests by analyzing the codebase, auto-detecting the test framework, and generating tests that follow project conventions. Use when writing new tests or updating tests after implementation.