Merge branch 'master' into organization-contact

This commit is contained in:
Wyatt Johnson
2018-04-17 13:07:16 -06:00
37 changed files with 1812 additions and 1702 deletions
+31
View File
@@ -0,0 +1,31 @@
const mongoose = require('../services/mongoose');
beforeAll(function(done) {
mongoose.connection.on('open', function(err) {
if (err) {
return done(err);
}
return done();
});
}, 30000);
beforeEach(async () => {
await Promise.all(
Object.keys(mongoose.connection.collections).map(collection => {
return new Promise((resolve, reject) => {
mongoose.connection.collections[collection].remove(function(err) {
if (err) {
return reject(err);
}
return resolve();
});
});
})
);
});
afterAll(async function() {
await mongoose.disconnect();
});