Mocks are brittle if calling an external service. Less so if you’re calling your own functions, but then you can just call your own functions. Definitely my least used test artifact at this point.
DI is preferable. I have an in memory file system fake I inject into an environment abstraction in my main app. It’s fine.
I really prefer to use the cassette approach at the boundary though. It’s the most reliable and least brittle paradigm imo.






















