Chapter 10: Tests

So far every check is one somebody wrote in advance. The oldest check of all needs no foresight: start the thing and look at it.

Empirical verification

Also called Prove it works, Run it and look

Checking a claim by running the real program on the surface a user touches and looking at what happens: open the page, send the request, read the row in the database. What you saw counts, and what the agent says it saw does not.

An agent's "it should work now" is a prediction, and "it compiles" is a proxy. A real run is the check that catches what nobody wrote a test for, such as a page that renders blank. It costs tokens and time, and it proves only the paths you drove.

Say it to your agent

“Don't tell me it works. Start the app with bun run dev, drive /checkout in Playwright with the test card, and paste the order number, a screenshot, and the row from SELECT * FROM orders ORDER BY id DESC LIMIT 1. Save those steps as scripts/verify-checkout.ts so I can re-run them.”

The workshop

Name a word, or describe what you mean in everyday language.