jookyboi
10/4/2013 - 7:03 PM

Testing async code using Mocha. From http://visionmedia.github.io/mocha/#asynchronous-code

Testing async code using Mocha. From http://visionmedia.github.io/mocha/#asynchronous-code

describe('User', function(){
  describe('#save()', function(){
    it('should save without error', function(done){
      var user = new User('Luna');
      user.save(function(err){
        if (err) throw err;
        done();
      });
    })
  })
})