Hacker News new | past | comments | ask | show | jobs | submit login

Don't test methods. Test behaviour that stands behind them. Unit in "unit testing" stands for behaviour not method/function. Private methods are private because they should not be exposed outside, never. Changing internal implementation of module should not crash test suite.

Applications are open for YC Winter 2021

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