This package clears your entire database for testing purposes.
To learn more about testing with Meteor, consider purchasing our book The Meteor Testing Manual.
Your support helps us continue our work on Velocity and related frameworks.
meteor add xolvio:cleaner
resetDatabase only resets your database when it is executed inside a debugOnly environment.
You can clear your database with:
var cleaner = Package['xolvio:cleaner'];
// delete all collections
cleaner.resetDatabase();
You can do this inside a Meteor method and call it from your client tests.
var cleaner = Package['xolvio:cleaner'];
// delete all collections except myCollection
cleaner.resetDatabase({excludedCollections: ['myCollection']);