drop-mongodb-collections
v2.0.0
Published
Drops all (non system) mongodb collections
Downloads
37
Maintainers
Readme
drop-mongodb-collections
Drops all non system mongodb collections. To be used for tests.
Usage
> npm i drop-mongodb-collections --save-dev
const dropMongoDbCollections = require('drop-mongodb-collections')('mongodb://localhost/tests');
// Mocha
describe('something', function() {
// Cleanup db before running tests
beforeEach(dropMongoDbCollections);
// Your tests go here
});