After updating up to mongoose v4.4.7 mongoose.connect returns only a bunch of some setters and Promise. Before updating it returned other object. Couldn't find any info in documentation.
--- UPDATE ---
let mongoose = require('mongoose');
let config = require('./config/env/test');
// config.db === 'mongodb://localhost/testdb'
let db = mongoose.connect(config.db);
console.log(db);
The problem is that in v4.4.7 I'm getting Mongoose object instead of MongooseThenable.
As an example, gridfs-stream doesn't work:
let gfs = new Grid(db.connection.db, db.mongo);
It throws an error:
Error stack Error: missing db argument
new Grid(db, mongo)