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

The keyword is "static". You'll often want to use a mock implementation rather than connecting to a remote server, checking for a 404 error and returning true or false - every time you run your tests.

Loosely coupled objects will allow you to do that, but how would you redefine the behavior of something static?



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: