createConnection is not return the connection
Closed this issue · 3 comments
omri-shaiko commented
Mongoose return the connection when i use it like this:
var conn = mongoose.createConnection('mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]', options); (from http://mongoosejs.com/docs/connections.html)
But mockgoose don't return the connection at all. Why is that? and how can i get it?
Tnx
akoskm commented
I can confirm this. If I call mongoose.createConnection
on a mongoose object that was previously mockgoose(mongoose)
'd, createConnection
returns undefined.
omri-shaiko commented
See this PR:
#198
winfinit commented
resolved in 6.0.1, thank you for reporting this issue.