Vibe Coding playbook/Module 6 · Quality & testing

Day 52 / 100 · Quality & testing

Let it check its own work.

Automated tests are small programs that check your code gives the right answer. The agent writes them. You decide what they check.

Ask Like This

Write tests for the leave-day calculation. Cases: a normal week, a span over a weekend, a public holiday, a month end, and a single day. Run them and show me the results.

Three Terms

Unit test

Checks one small piece does one thing right.

Test runner

Runs them all: npm test or pytest.

Pass / fail

Green is good. Red tells you exactly what broke.

Watch for

Tests that check nothing important.

Tests only for the easy cases.

The agent changing a test to make it pass.

Tests that never actually ran.

You choose the cases. It writes the tests.