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

Otoh: I got react to run my tests without any warnings today.


If I write a bunch of tests for new code, and all of them pass on the first attempt, I'm immediately suspicious of a far more egregious bug hiding somewhere…


Where feasible, I like to start a suite with a unit test that validates the unit's intended side effects actually occur, as visible in their mocks being exercised.


I laughed. Thank you for that


Sure. For Patreon subscribers at the $5/month tier and up, I also have a course on making integration ("e2e", "functional") tests more maintainable by eliminating side effects.


"never trust a test you've never seen fail." has kept me honest on more than one occasion.


// Todo: remove

return true;


/bin/true used to be an empty file. On my desktop here, it's 35K (not counting shared libraries), which is an asolute increase of 35K and a relative increase of ∞%.




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

Search: