Back to Developer Roadmap

When You Find A Bug Ask Ai To Write A Breaking Test And Then Fix@R LrA1cGR1XMu1p2xIsN0

src/data/roadmaps/vibe-coding/content/when-you-find-a-bug-ask-ai-to-write-a-breaking-test-and-then-fix@r-LrA1cGR1XMu1p2xIsN0.md

4.0285 B
Original Source

Use breaking tests

Before fixing a bug, ask AI to write a test that reproduces it, that is, a test that currently fails because of the broken behavior. Then ask it to fix the code so the test passes. This confirms the fix is real and prevents the same bug from coming back silently.