Created
October 4, 2013 19:03
-
-
Save jookyboi/6830993 to your computer and use it in GitHub Desktop.
Testing async code using Mocha. From http://visionmedia.github.io/mocha/#asynchronous-code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
}); | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment