我正在使用Node.jsMongodbnative驱动程序运行一些集成测试。每个测试都涉及连接到数据库,验证它不存在(例如,没有任何带文档的集合),运行测试,然后删除数据库。高级代码如下:construnSafeTest=functionrunSafeTest(test){async.waterfall([connectToMongo,throwIfDbExists,instantiateServerConnection,test],functiondoneWaterfall(err,db){db.dropDatabase(function(dbErr){if(dbErr)throwd