fix(mongoose warning): Fixed mongoose warning when running tests

This commit is contained in:
Chris Troutner
2020-02-12 10:47:59 -08:00
parent 50c719eb51
commit 259a045ae7
+4 -1
View File
@@ -10,7 +10,10 @@ async function deleteUsers () {
// Connect to the Mongo Database.
mongoose.Promise = global.Promise
mongoose.set('useCreateIndex', true) // Stop deprecation warning.
await mongoose.connect(config.database, { useNewUrlParser: true })
await mongoose.connect(config.database, {
useUnifiedTopology: true,
useNewUrlParser: true
})
// Get all the users in the DB.
const users = await User.find({}, '-password')