title: Mocha Monitor Application Output
body: <p>I'm building a logging module for my web app in <code>nodejs</code>. I'd like to be able to test using <code>mocha</code> that my module outputs the correct messages to the <code>terminal</code>. I have been looking around but haven't found any obvious solutions to check this. I have found </p>
  
  <pre><code>process.stdout.on('data', function (){})
  </code></pre>
  
  <p>but haven't been able to get this to work. does anybody have any advice?</p>