title: Mocha + RequireJS = AMD testing
body: <p>I have a hard time connecting Mocha to RequireJS based application, may be You'll be able to come up with something :). After many hours when I've been trying to load AMD modules and simply console.log some 'fired' info that the module has been loaded... nothing happend had happened - the program just ended and printed out some mocha info.</p>
  
  <pre><code>var facade = requirejs(['../../public/js/scripts/widgets/widgets/article/main.js'],      
      function(mod) {
          console.log('fired')
  });
  // run with: $ mocha -u tdd test.js --reporter spec
  </code></pre>
  
  <p>and than I've come up with the idea to fire just this to test callbacks:</p>
  
  <pre><code>setTimeout((function() {
      console.log('fired');
  }), 5000);
  // run with: $ mocha -u tdd test.js --reporter spec
  </code></pre>
  
  <p>also didn't work. So finally I've run both with </p>
  
  <pre><code>$ node test.js 
  </code></pre>
  
  <p>and finally it worked. So question is than: <strong>How to run Mocha test with callbacks handling, as those are essential for AMD testing?</strong></p>