Install
openclaw skills install @bovinphang/fec-tdd-workflowUse when implementing new observable frontend behavior or fixing a behavior-changing bug where a failing test can describe the missing or incorrect behavior first. Apply to components, hooks/composables, utilities, API clients, route guards, or user workflows; pure behavior-preserving refactoring us
openclaw skills install @bovinphang/fec-tdd-workflowUse 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.
Pure behavior-preserving refactoring does not manufacture a failing test. If existing behavior is already correct and the goal is structural only, establish or add characterization coverage that passes for the current behavior, then keep it green through each refactoring step. Use RED → GREEN → REFACTOR for new behavior or a behavior-changing defect fix; use GREEN → REFACTOR → GREEN for pure refactoring.
When fixing a defect, make the test fail first, then make it pass. If it cannot fail first, it means that the test does not cover the original problem, and the input, assertion or test level needs to be narrowed.
| Risk | Preferred Test |
|---|---|
| utils, schema, status calculation | unit testing |
| hooks / composables | unit or lightweight integration testing |
| Component props, emits, interactions, status | Component testing |
| Router, Provider, Store collaboration | Lightweight integration testing |
| Login, payment, permissions, key CRUD | E2E testing |