title: Test that a function calls another function with Mocha
body: <p>I have a question about testing a specific situation in Mocha for Node.js. Suppose I had the following code in my app...</p>
  
  <pre><code>function a() {
       //...
  }
  
  function b() {
      //...
  }
  
  function c() {
      if(condition) {
           a();
      } else {
           b();
      }
  }
  </code></pre>
  
  <p>If I were testing function c, how could I verify that function a or function b got called? Is there a way to do this?</p>