Chapter 4. When Vibe Coding Isn’t Enough
At the end of Chapter 3, the lyrics-trainer demo worked. That’s good, but in a way, that’s also a problem. We verified persistence the way developers often verify small browser features. We manually opened the page in a browser, went to the developer tools, clicked a button, changed a localStorage value in the console, refreshed, and watched what happened.
That was useful, but it’s not a test. It’s a demo.
That distinction matters, because a demo is the most expensive and most unreliable way to test an application. Most demos don’t verify edge cases or failure modes. They just run enough to see the system work, and since most developers want to see the system work, they often don’t bother to prod. I wrote a book about testing1, so I’m hardly neutral about testing, but the point is that a demo proves the app worked once, while you were watching, while tests run automatically, checking their outputs against known results. A solid test suite has been a foundation of solid development for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access