title: How to test that a function in a Node module was called using Mocha
body: <p>I'm just starting out in Mocha, and I'm struggling to figure this one out.</p>
  
  <p>Let's say I have this Node app (app.js):</p>
  
  <pre><code>var myModule = require('./myModule');
  function startingPoint() {
     myModule.myFunction();
  }
  </code></pre>
  
  <p>and I have a module (myModule.js):</p>
  
  <pre><code>exports.myFunction = function() {
     console.log('hello, world');
  }
  </code></pre>
  
  <p>Now, what I'd like to do is test app.js and validate that when I call the function startingPoint, that myModule.myFunction gets called.  How would I go about that in Mocha?</p>
  
  <p>Thank you!</p>