One idea
Use a test double only when the real dependency makes the test slow, flaky, costly, or hard to control.
Do not fake the code you are trying to prove. Fake the outside thing your code talks to.
What doubles replace
A test double is a stand-in used during a test. It can replace an email sender, payment gateway, database, clock, file system, map service, or AI API call.
In hackathon projects, this often means you do not call Razorpay, Firebase, Google Maps, SendGrid, or an LLM API in a unit test. You replace that call with a small fake result.