Skip to content
Development
Command

/fec-tdd

Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor.

From plugin
frontend-craft
2111 skills14 agents11 commands5 hooks
+1
Install
> /plugin marketplace add bovinphang/frontend-craft
> /plugin install frontend-craft@frontend-craft

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/fec-tdd

Context preview

What this command does when you run it.

Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor.

Command definition

fec-tdd.md
name: fec-tdd
description: Use front-end TDD workflow to implement functions, fix bugs, or refactor logic: first write failing tests, then implement minimal code, and then refactor.

Perform test-driven development as per `fec-tdd-workflow`.

Execution steps

1. Identify the front-end behavior to be verified. 2. Select the test layer for the nearest risk: Unit, Component, Lightweight Integration, or E2E. 3. Write a minimum failure test and run it to confirm that the failure reason is correct. 4. Write the minimum implementation to make the test pass. 5. Keep the tests passed before refactoring. 6. Summarize test orders, coverage actions, and remaining risks.

Diversion

  • Component and hook testing: `fec-component-testing`
  • Cross-page browser process: `fec-e2e-testing`
  • Test layering strategy: `fec-testing-strategy`

Boundary

Use this command for new observable behavior and behavior-changing bug fixes. For pure behavior-preserving refactoring, do not invent a RED test: characterize the already-correct behavior and keep it GREEN → REFACTOR → GREEN.

Ships withfrontend-craft

frontend-craft is a universal frontend plugin that brings the same opinionated engineering standards to all 15 AI coding assistants.

Get the whole plugin

Other commands on frontend-craft.