-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
This is combined pull request. Removals in article could be done in parallel, then I suggest to make mongoose async by using bluebird promisify. Would that be okay? That would be another issue, and I can make a new pull request later for that. |
Actually I had some randomly appearing errors caused by this issue. When I made this fix all to my tests those errors disappeared. |
@@ -69,7 +70,8 @@ describe('User Model Unit Tests:', function() { | |||
}); | |||
|
|||
after(function(done) { | |||
User.remove().exec(); | |||
done(); | |||
User.remove().exec(function(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you pass done
to .exec?
Now done is passed to exec as a parameter |
Same fixes here please. |
It seems to be already okay
|
Article.remove().exec(); | ||
User.remove().exec(); | ||
done(); | ||
Article.remove().exec(function(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space between ()
and {
.
Fixed formatting |
Great! @vepasto can you squash the commits down to 1 commit so that we don't pollute the commit log? I'll merge right after. |
Done |
Wait for async savings and removing in mocha tests
No description provided.