Skip to content

Instantly share code, notes, and snippets.

@thanpolas
Created February 13, 2014 13:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanpolas/8975350 to your computer and use it in GitHub Desktop.
Save thanpolas/8975350 to your computer and use it in GitHub Desktop.
How to test a promise returning async method using Mocha
test('test case', function(done) {
promise.method(function(result) {
assert.equal(result.name, 'mocha');
}).then(done, done);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment