title: How to unit test 'private' utility function in nodejs
body: <p>I'm currently writing some tests for a nodejs application.
  assume that I have a module like this:</p>
  
  <pre><code>module.exports = function myModule(moduleParam) {
      var someVar;
      ....
      ....
      function helper(param) {
          return param + someVar;
      }
      return {
          doSomething: function (bar) {
              ....
              ....
              var foo = helper(bar);
              ....
              ....
          }
      };
  };
  </code></pre>
  
  <p>Assume that the 'helper' function is useful only within the module and should not be exposed to the outside. </p>
  
  <p>What is the 'best practice' for testing it? (of course, I can test the doSomething function as a whole,but this way, the 'helper' function is tested in a particular situation, in a 'black-box' fashion).</p>
  
  <p>I'm using nodeunit as testing framework, for that metter, but I can change it on need.</p>