mocha-mongoose
mocha-mongoose copied to clipboard
New Mocha 3.0.0 breaks mocha-mongoose
I'm using mocha-mongoose@^1.2.0 in my tests and with the new mocha version 3.0.0 an error is thrown.
Error: Resolution method is overspecified. Specify a callback or return a Promise; not both.
This Error is described here https://github.com/mochajs/mocha/blob/master/CHANGELOG.md#boom-breaking-changes
Thank you! If you have a suggestion of how to fix it, that'd great.
You need to select the actual db. maybe you can extract the name from the URL, and if not given use a default like 'test'.
client.connect(uriString, function(err, database){
if (err) return done(err);
db = database.db('test');
clearCollections(done);
});