title: Adding a default before() function for all the test cases (Mocha)
body: <p>I'm writing functions for my node.js server using TDD(Mocha). For connecting to the database I'm doing </p>
  
  <pre><code>before(function(done){
    db.connect(function(){
        done();
     });
  });
  </code></pre>
  
  <p>and I'm running the test cases using <code>make test</code> and have configured my makefile to run all the js files in that particular folder using <code>mocha *.js</code></p>
  
  <p>But for each <code>js</code> file I'll have to make a separate connection to the database, otherwise my test cases fail since they do not share common scope with other test files.</p>
  
  <p>So the question is, Is there anything like <code>beforeAll()</code> that would just simply connect once to the database and then run all the test cases? Any help/suggestion appreciated.</p>