I\'m currently writing some tests for a nodejs application. assume that I have a module like this:
module.exports = function myModule(moduleParam) {
var some
You don't test it. Unit testing is black box testing. This means that the only thing you test is the public interface aka contract.
Private functions such as these only can happen from refactoring public ones.
So if you consequently use TDD your private functions are implicitly tested.
If this feels wrong it's most often because your structure is wrong. Then you should think about moving your private stuff to an extra module.