Skip to content
Back to skills

Test Quality

ASecurity

Use when writing or evaluating a test. Defines what makes a test good — behavioral, focused, and actually able to catch a regression.

  • 5 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added August 31, 2026
developmentgotesting

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned August 31, 2026

npx -y skills add localplugins/plugins --skill test-quality --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Quality?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Quality
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/localplugins-test-quality/badge)](https://www.skillsdirectory.com/skills/localplugins-test-quality)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-quality
description: Use when writing or evaluating a test. Defines what makes a test good — behavioral, focused, and actually able to catch a regression.
---

# Test Quality

A good test catches a real regression and reads as a spec of intended behavior. A test that can't fail when the code breaks is worse than no test — it gives false confidence.

## Use when

- Writing or updating a test (as `test-writer`).
- Judging whether a test is worth keeping (as `green-guardian`).

## Decision guide

1. **Assert behavior, not implementation.** Check outputs and observable effects, so refactors don't break the test but bugs do.
2. **Critical path first, then real edge cases** — empty/null inputs, boundaries, error paths, off-by-one. Skip edge cases that can't actually occur.
3. **Narrowest assertion that captures intent** — exact values over "truthy".
4. **Deterministic** — no reliance on time, network, ordering, or randomness without control.
5. **Named for the behavior** — `returns_zero_for_empty_cart`, not `test1`.
6. **One behavior per test** — split so a failure localizes the bug.
7. **Match the project** — its framework, file layout, and naming conventions. Put the test where its neighbors live.

## Avoid

- Tautologies (`expect(x).toBe(x)`) and mock-testing-mocks (asserting only that a mock was called, with no real output check).
- Over-mocking that hides the behavior under test.
- One giant test asserting ten things.
- Snapshot tests as a substitute for meaningful assertions.

Every test you write should pass its revert-verification (see the `anti-fake-green` skill): fail on the pre-change code, pass on the change.

## Deep reference

- **`references/test-patterns.md`** — good-vs-bad test examples across ecosystems: behavioral vs. implementation assertions, edge-case selection, controlling nondeterminism, right-sized mocking, and one-behavior-per-test splits.

Files in this skill

  • SKILL.md1.9 KB
  • references/test-patterns.md5.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.