Johnder Perez

Step 6 of 6

Test-driven development (TDD)


Write a failing test that describes what you want, write the smallest code that makes it pass, then clean up. Red, green, refactor.

Why it matters when you build with AI: TDD is a great way to direct AI: the test is a precise spec that the model can't fake its way around.

Quick check

The TDD cycle is…

← Previous step Finish: try the challenge β†’