HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by arielby | Hacker News Reader
Parent
Full thread
arielby
·
That's why you mock the IO - to make the IO call return an error.
View on HN
ignorabilis
·
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.
Reply on news.ycombinator.com