Tests differ mostly in how much of the system they switch on. More real parts means more truth, and also more time and more ways to fail for no good reason.
Unit test
A test of one small piece of code on its own, usually a function. It runs in milliseconds and points straight at what broke.
Fast tests are the ones an agent can run on every attempt. They also suit agents badly in one way: they can pass while the pieces fail to fit together, and they are the easiest kind to write without checking anything.
Say it to your agent
“Add unit tests for parsePrice in src/price.ts: normal input, an empty string, a negative number and "1,000.50". No network, no database, and the whole file should run in under 100 ms.”