mongo-unit
Advanced tools
Comparing version 1.3.4 to 1.4.4
22
index.js
@@ -15,2 +15,3 @@ 'use strict'; | ||
port: 27017, | ||
version: 'latest', | ||
} | ||
@@ -24,3 +25,9 @@ | ||
opts.port = port | ||
mongodHelper = new MongodHelper(['--port', port, '--dbpath', opts.dbpath, '--storageEngine', 'ephemeralForTest']); | ||
mongodHelper = new MongodHelper([ | ||
'--port', port, | ||
'--dbpath', opts.dbpath, | ||
'--storageEngine', 'ephemeralForTest' | ||
], { | ||
version: opts.version, | ||
}); | ||
return mongodHelper.run() | ||
@@ -147,3 +154,3 @@ .then(() => { | ||
}) | ||
return Promise.all(requests) | ||
return Promise.all(requests).then(() => db.close()) | ||
}) | ||
@@ -154,6 +161,9 @@ } | ||
return client.connect(url) | ||
.then(db => db.collections()) | ||
.then(collections => { | ||
const requests = collections.map(col => col.drop()) | ||
return Promise.all(requests) | ||
.then(db => { | ||
return db.collections() | ||
.then(collections => { | ||
const requests = collections.map(col => col.drop()) | ||
return Promise.all(requests) | ||
}) | ||
.then(() => db.close()) | ||
}) | ||
@@ -160,0 +170,0 @@ } |
{ | ||
"name": "mongo-unit", | ||
"version": "1.3.4", | ||
"version": "1.4.4", | ||
"description": "mongo db for unit tests", | ||
@@ -36,3 +36,3 @@ "main": "index.js", | ||
"mongodb": "~2.2.31", | ||
"mongodb-prebuilt": "~6.3.3", | ||
"mongodb-prebuilt": "~6.4.0", | ||
"portfinder": "^1.0.10", | ||
@@ -39,0 +39,0 @@ "ps-node": "^0.1.4" |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
180
0
12151
6
+ Addedmongodb-prebuilt@6.4.0(transitive)
- Removedmongodb-prebuilt@6.3.6(transitive)
Updatedmongodb-prebuilt@~6.4.0