unit-test-generator

Installation
SKILL.md

Unit Test Generator

Discovery

Before writing a single test, extract the full contract of the target code:

  • Inputs — types, optionality, valid ranges, format constraints
  • Outputs — return type, shape, nullability; does it mutate args or external state?
  • Dependencies — what does it call that needs mocking? (DB, fetch, logger, Date, Math.random)
  • Implicit assumptions — things the function expects to be true but doesn't validate (e.g. "caller always passes a non-empty array")
  • Branching logic — every if, ternary, ||, &&, and ?? is a branch that needs at least one test each side

Test Case Taxonomy

Map the function's contract to these four layers before writing:

Layer What to test Common miss
Happy path Canonical input → expected output Only testing one example when the function has meaningful variation
Related skills

More from blunotech-dev/agents

Installs
1
GitHub Stars
2
First Seen
Apr 22, 2026