Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Wait for async savings and removals #421

Merged
merged 1 commit into from
Feb 23, 2015
Merged

Conversation

vepasto
Copy link
Contributor

@vepasto vepasto commented Feb 18, 2015

No description provided.

@vepasto
Copy link
Contributor Author

vepasto commented Feb 18, 2015

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.

@vepasto vepasto changed the title 0.4.0 Wait for async removals Feb 18, 2015
This was referenced Feb 18, 2015
@vepasto
Copy link
Contributor Author

vepasto commented Feb 18, 2015

Actually I had some randomly appearing errors caused by this issue. When I made this fix all to my tests those errors disappeared.

@vepasto vepasto changed the title Wait for async removals Wait for async savings and removals Feb 18, 2015
@@ -69,7 +70,8 @@ describe('User Model Unit Tests:', function() {
});

after(function(done) {
User.remove().exec();
done();
User.remove().exec(function(){
Copy link
Member

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?

@vepasto
Copy link
Contributor Author

vepasto commented Feb 19, 2015

Now done is passed to exec as a parameter

@ilanbiala
Copy link
Member

Same fixes here please.

@vepasto
Copy link
Contributor Author

vepasto commented Feb 20, 2015

It seems to be already okay

Running "jshint:all" (jshint) task
>> 79 files lint free.

Article.remove().exec();
User.remove().exec();
done();
Article.remove().exec(function(){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space between () and {.

@vepasto
Copy link
Contributor Author

vepasto commented Feb 22, 2015

Fixed formatting

@ilanbiala
Copy link
Member

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.

@vepasto
Copy link
Contributor Author

vepasto commented Feb 23, 2015

Done

@vepasto vepasto closed this Feb 23, 2015
@vepasto vepasto reopened this Feb 23, 2015
ilanbiala added a commit that referenced this pull request Feb 23, 2015
Wait for async savings and removing in mocha tests
@ilanbiala ilanbiala merged commit 709c27f into meanjs:0.4.0 Feb 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants