Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> then your test should include real input files in it! There's no reason to mock any of this.

That's okay for testing some branches of your code. But not all. I don't want to have to actually crash my hard drive to test that I am properly handling hard drive crashes. Mocking[1] is the easiest way to do that.

[1] For some definition of mock. There is absolutely no agreement found in this space as to what the terms used mean.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: