drop-mongodb-collections

JSON →
library 2.0.0 ·javascript
verified Jun 5, 2026

A utility to drop all non-system collections from a MongoDB database. Version 2.0.0 is stable, with infrequent releases. It is designed specifically for test setup/teardown, accepting a MongoDB URI and returning a cleanup function. Unlike generic drop-database tools, it preserves system collections and integrates easily with Mocha's beforeEach.