Hacker News new | ask | show | jobs
by ignorabilis 4026 days ago
You don't need to mock it. In your tests just manually call the code that is going to be executed if the I/O call returns an error. This goes for both OOP and FP.