Comment on Closures for class/module privacy considered harmfulparentComments−paultannenbaum13yHere is a link to an article that discusses one possible way to test private functions: http://philipwalton.com/articles/how-to-unit-test-private-fu...He basically exposes them while in a dev environment, and then uses a build tool to make them actually private. I agree with weego's comment though, its something that isn't usually worth the tradeoffs, as long as your team has discipline.
Comments
Here is a link to an article that discusses one possible way to test private functions: http://philipwalton.com/articles/how-to-unit-test-private-fu...
He basically exposes them while in a dev environment, and then uses a build tool to make them actually private. I agree with weego's comment though, its something that isn't usually worth the tradeoffs, as long as your team has discipline.