/*Drop all Mongo test databases.Usage example: mongo delete-mongo-test-dbs.jswill drop every database that starts with "test_" or "acceptance_",but ignore other databases.*/String.prototype.startsWith=function(substring){return(this.indexOf(substring)==0);}vardbNameList=db.getMongo().getDBNames();for(variindbNameList){if(dbNameList[i].startsWith('test_')||dbNameList[i].startsWith('acceptance_')){dbToDrop=db.getMongo().getDB(dbNameList[i]);print("Dropping test db "+dbNameList[i]);dbToDrop.dropDatabase();}}