fec-tdd-workflow

Installation
SKILL.md

Front-end TDD workflow

Purpose

Use the rhythm of "write failing tests first, then implement the minimum code, and then refactor" to deliver front-end functions to avoid supplementing coverage only after implementation.

Procedure

  1. Identify observable behaviors: UI, component contracts, hook/composable return values, route guard results, API client output or error status that users can see.
  2. First write a minimum failure test:
    • Pure logic first unit testing.
    • Prioritize component interaction Testing Library / Vue Test Utils.
    • Prioritize critical processes across pages Playwright/Cypress.
  3. Run the test and confirm that the failure reason is correct and should come from behavior that has not yet been implemented, rather than a syntax, import, or test environment error.
  4. Write the minimum implementation that can just pass the test, and do not expand the scope easily.
  5. Rerun the test and confirm it turns green.
  6. Refactor naming, boundaries and duplication logic while keeping tests passing.
  7. Fix bugs and retain regression tests that can reproduce the problem.
  8. Only one observable behavior is expanded in each round; new requirements, new boundaries and new abnormal paths enter the next round respectively.
Installs
6
GitHub Stars
23
First Seen
May 25, 2026