ReferenceWhat can and can’t be tested
Reference

What can and can’t be tested

Where we’ll write a test, and where we’ll say so instead.

The short answer

We write a test only where we can prove it would pass for the right reason. Everywhere else we say what’s in the way rather than writing something weaker.

What we’ll write

A page calling a route
The commonest line on the map, and the one to start with.
A route on its own
Its own check, if it’s a webhook: that a payload with no signature is refused. Any other route gets no file of its own yet.
A route reading a table
Tested through the route, because a table isn’t reached on its own.

What we won’t

A page whose address needs a real value
/book/:slug needs a slug that exists in your data. We know the address; we can’t invent one that’s really there.
What your app is for
Whether checkout charges the right amount is a question about your business, and it’s in no catalogue of ours.

What people expectNothing was offered, so the scanner missed it.

What happensThe panel says which of these it is, in words, on the line you pressed. A refusal with a reason is an answer; we’d rather give you that than a test that proves nothing.