How do tests make working with AI safe?
Essence
Tests are the main way to verify code you didn't write line by line. They pin down behaviour, so AI can refactor boldly: green tests mean behaviour is preserved; red ones mean the agent sees the problem itself and fixes it before the diff reaches you.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep