L4 — Testing & Quality
Track 2: Vibe-Coder Level-Up · B.U.I.L.D. letter: D (Document, Test & Deploy)
"I clicked it once and it worked" is a hope, not a guarantee. Testing is how you know — and how you stop fixing the same bug three times.
⚠️ The vibe trap
Vibe-coded apps are tested by vibes: the builder clicks the one path they always click. Then a real user does something slightly different and it falls over. Testing replaces hope with evidence.
🎯 What's actually worth testing
You don't test everything — you test what matters and what breaks:
- The critical path — the core thing your app exists to do (sign up, save, check out).
- The risky logic — calculations, permissions, anything with money or data.
- The bugs you've already hit — write a test so they never come back.
🧪 The two tests you'll use most
- Unit test — checks one small piece (a function) gives the right output for given inputs, including edge cases.
- Integration test — checks pieces work together (e.g., submitting the form actually saves to the database).
A first unit test is just: call the function with an input, assert the output is what you expect. That's it.
📋 When automated tests are overkill
For a tiny project, a written manual test plan is legitimate: a checklist of "do X, expect Y" you run before each release. The point isn't ceremony — it's that testing is deliberate and repeatable, not vibes.
🛠️ Your mission
Identify your app's critical path. Then either (a) write one unit test + one integration test for it, or (b) write a 5-step manual test plan with exact "expect" outcomes. Run it. Did anything surprise you?
✅ You're done when…
- You can name your app's critical path
- It has at least one real test (automated or a written plan)
- Any bug you've hit before has a test guarding against its return
➡️ Next: L5 — Version Control & Collaboration. Build It Right, Or Don't Build It At All. 🏛️