cyberneticlibrary

Write focused unit test coverage

tdmcp-coverage-writerskillsetup L26
Pantani/tdmcp
What it does

Write focused unit tests for specific coverage gaps

Best for

When you need to raise test coverage without weakening behavior under focused branch requirements.

Inputs
  • · target implementation file
  • · coverage gap description
  • · nearest existing test
Outputs
  • · new Vitest/msw test file
  • · single behavior assertion covering the gap
Requires
  • · Vitest
  • · msw (mock service worker)
  • · tdMock test helpers
Preconditions

Assigned specific coverage gap, implementation and test infrastructure already in place

Failure modes
  • · Test only marks lines visited (import-for-coverage)
  • · Oversized snapshot instead of behavior
  • · New scaffolding instead of existing helpers
Trust signals
  • · Prefers real CallToolResult text/JSON blocks
  • · Avoids import-for-coverage anti-pattern
  • · Reuses existing helpers (tdMock, KnowledgeBase, RecipeLibrary)