title: Mocha tests cases not waiting before to complete
body: <p>I'm writing test cases with mocha in Nodejs and want to reset database data before running the tests. I'm using Knex as query builder for executing queries.</p>
  
  <p>I wrote following logic:</p>
  
  <pre><code>describe('Activities:', function() {
  
    before(funtion(){
     activityDBOperations.deleteAll()
     .then(function(){
         // all records are deleted
     });
    });
  
    it('it should add a record into Activities table: multiple time activity',  function(done) {
      activityDBOperations.addRecord(requestParams)
          .then(function(data) {
              expect(data.length &gt; 0).to.equal(true);
              done();
          });
    });
  });
  </code></pre>
  
  <p>The problem is that test cases start executing and not waiting for deleteAll operation to finish. What I understand is since deleteAll is returning promise, the program execution move forward because of asynchronous nature of promises.</p>
  
  <p>How can I make sure that test cases should run only when deleteAll has finished?</p>