Browse Source

build(deps): bump mongo

Signed-off-by: Jytesh <44925963+Jytesh@users.noreply.github.com>
master
Jytesh 3 years ago
parent
commit
f3de384118
  1. 5
      packages/mongo/src/index.js
  2. 6
      packages/mongo/test/index.js

5
packages/mongo/src/index.js

@ -21,7 +21,8 @@ class KeyvMongo extends EventEmitter {
{
url: 'mongodb://127.0.0.1:27017',
collection: 'keyv',
emitErrors: true
emitErrors: true,
tls: true
},
url,
options
@ -94,7 +95,7 @@ class KeyvMongo extends EventEmitter {
get (key) {
return this.connect.then(store =>
store.findOne({ key: { $eq: key } }).then(doc => {
if (doc === null) {
if (doc === undefined) {
return undefined
}

6
packages/mongo/test/index.js

@ -16,7 +16,8 @@ test('Collection option merges into default options', t => {
url: 'mongodb://127.0.0.1:27017',
mongoOptions: {
useNewUrlParser: true,
useUnifiedTopology: true
useUnifiedTopology: true,
tls: true
},
collection: 'foo',
emitErrors: true
@ -29,7 +30,8 @@ test('Collection option merges into default options if URL is passed', t => {
url: mongoURL,
mongoOptions: {
useNewUrlParser: true,
useUnifiedTopology: true
useUnifiedTopology: true,
tls: true
},
collection: 'foo',
emitErrors: true

Loading…
Cancel
Save