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

Unit test fix for mocha update #548

Merged
merged 1 commit into from
Nov 8, 2017
Merged

Conversation

mcgG
Copy link
Contributor

@mcgG mcgG commented Nov 7, 2017

RAC: https://rackhd.atlassian.net/browse/RAC-5743

Paired with @PengTian0

Using both return promise and done() in async unit test case will cause following error:
Resolution method is overspecified. Specify a callback *or* return a Promise; not both.

According to Mocha's official site:
In Mocha v3.0.0 and newer, returning a Promise and calling done() will result in an exception

Solution

Only call done() instead of return a promise in all async unit test cases.

@PengTian0 @pengz1 @anhou @iceiilin @bbcyyb

@anhou anhou merged commit 8936c50 into RackHD:master Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants