Created
February 13, 2014 13:52
-
-
Save thanpolas/8975350 to your computer and use it in GitHub Desktop.
How to test a promise returning async method using Mocha
This file contains 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
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