Re:How to Test Private Functions in JS Modules
by mthenw on Wednesday July 30, 2014 @01:16PM
(#8109566)
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.
[ Parent
| on HN ]
There are no comments on this comment yet.