Keep MongoDB connection open while running tests using mocha framework
问题 I'm using something akin to How to properly reuse connection to Mongodb across NodeJs application and modules to keep my mongoDB Connection open. This requires all the code to go into a MongoDB.connectDB(async (err) => {...} Block. How would I use this when writing Tests with Mocha. Do I have to use a separate Connection for every test? Like this? const MongoDB = require('../src/mongoUtil') // providing access to the mongo database var events = require('../src/events') // containing all my