Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use promises instead of done() for async tests #84

Merged
merged 1 commit into from
Apr 11, 2016

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Apr 11, 2016

This uses Mocha's neat promise support and a bit of promise chaining to generate more meaningful test failures during development while keeping the code clean.

(The alternative would have been to put a try { ... } catch(e) { done(e); } around each deferred expect block, and that's just plain nasty)

I'll happily rebase #83 in this style if this PR is accepted.

@wheresrhys wheresrhys merged commit bed627c into wheresrhys:master Apr 11, 2016
@wheresrhys
Copy link
Owner

great - thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants