I am trying to set the test database for the testing purpose, but its not working.
I am trying to connect to mongodb using mongoose, but finding problem in connection er
const db = process.env.MONGO || 'test' mongoose.connect(db, { useNewUrlParser: true, useUnifiedTopology:true, useCreateIndex: true }).then(()=>{ console.log("conected to mongodb"); }).catch(error => { console.log("mongo error",error); })