Test-Driven Development in React
Learning Outcome Guide
Section titled “Learning Outcome Guide”At the end of this class, you should be able to…
- Explain the principles and workflow of Test-Driven Development (TDD).
- Write tests that define expected behaviour before implementing functionality.
- Apply the red-green-refactor cycle to build reliable and maintainable React components.
Additional Notes: Emphasize that TDD encourages writing only as much code as needed to pass a test. Encourage students to think in terms of behaviour rather than implementation. Stress that tests act as living documentation of behaviour.