When I start my tests I see this:
DeprecationWarning: open() is deprecated in mongoose >= 4.11.0, use openUri() instead, or set the useMongoClient option if using connect() or createConnection(). See http://mongoosejs.com/docs/connections.html#use-mongo-client
When I run npm run dev then I don't get this message, only when I run my tests.
open()Following console warning:
(node:5017) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()`
or `createConnection()`. See http://mongoosejs.com/docs/connections.html#use-mongo-client
Was fixed in mongoose version 4.11.3. It requires small config changes:
- mongoose.connect(await mongod.getConnectionString())
+ mongoose.connect(await mongod.getConnectionString(), { useMongoClient: true })
For more info you may read docs and may see this issues #5423, huge #5399
Thanks for issue, I made proper changes in README.md
Most helpful comment
Fix mongoose deprecationWarning:
open()Following console warning:
Was fixed in mongoose version 4.11.3. It requires small config changes:
For more info you may read docs and may see this issues #5423, huge #5399
Thanks for issue, I made proper changes in README.md