SuperAPI AI Directory

write-tests

Testing & quality

View repository

Updated 10-16 08:02

About this skill

Test Coverage

Write valuable tests that improve confidence and coverage; prefer behavior likely to regress over assertions that only inflate percentages.

Quick Start

  1. Explore the repo and run scripts/repo_test_probe.py from the skill directory to infer stack, tooling, and coverage artifacts.
  2. Use coverage reports for cold spots, or infer gaps from changed code, complex logic, public APIs, and error-handling branches.
  3. Match the project's existing style, fixtures, and naming; run the narrowest test command first, then broaden until coverage improves.

Pick High-Value Targets

  • Prioritize: branchy business logic, error handling/retries/validation, serialization/parsing/adapters, bug-prone changes, public entry points.
  • De-prioritize: thin wrappers, snapshot-heavy/implementation-coupled tests (unless already relied on), mock-only assertions with no observable outcome.

Guardrails

  • Assert outputs and observable behavior, not lines; cover success, failure, and edge cases.
  • Do not chase 100% coverage over value, rewrite unrelated tests, or add a new framework if one exists.
  • If hard to test due to design issues, note the seam and add the best regression coverage feasible.

References

  • REFERENCE.md for target selection heuristics and framework signals.
  • scripts/repo_test_probe.py to inspect the repo before choosing commands or file locations.