Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

drop-mongodb-collections

saintedlama59ISC2.0.0

Drops all (non system) mongodb collections

mongodb, collections, test, testing

readme

drop-mongodb-collections

Drops all non system mongodb collections. To be used for tests.

Node.js CI

Coverage Status

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
});

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.0.0 (2022-05-21)

⚠ BREAKING CHANGES

  • will not work with callbacks

  • chore: remove unused packages

Features

Bug Fixes

1.2.6 (2021-01-09)

1.2.5 (2019-10-14)

Bug Fixes

  • remove cross-env to not break builds in node 6 and 7 (a287480)
  • update dependencies to fix vulnerabilitites (c7932a1)

1.2.4 (2018-08-14)

Bug Fixes

1.2.3 (2018-07-04)

Bug Fixes

1.2.2 (2018-02-27)

Bug Fixes

  • destructure after error handling (c846ca8)

1.2.1 (2018-02-27)

Bug Fixes

  • drop only non system collections (c48a096)

1.2.0 (2018-02-27)

Features

  • upgrade to mongo db native version 3 (456f71f)