mongodb-memory-server
Advanced tools
Comparing version 2.4.0 to 2.4.1
@@ -159,6 +159,4 @@ "use strict"; | ||
_this4._state = 'init'; | ||
_this4.emit(_this4._state = 'init'); | ||
_this4.emit('state', 'init'); | ||
_this4.debug('init'); // Any servers defined within `opts.instanceOpts` should be started first as | ||
@@ -201,6 +199,11 @@ // the user could have specified a `dbPath` in which case we would want to perform | ||
_this5.servers = []; | ||
_this5._state = 'stopped'; | ||
return Promise.all(servers.map(s => s.stop())).then(() => true).catch(err => { | ||
return Promise.all(servers.map(s => s.stop())).then(() => { | ||
_this5.emit(_this5._state = 'stopped'); | ||
return true; | ||
}).catch(err => { | ||
_this5.debug(err); | ||
_this5.emit(_this5._state = 'stopped', err); | ||
return false; | ||
@@ -216,3 +219,3 @@ }); | ||
if (_this6._state === 'running') return; | ||
yield new Promise(resolve => _this6.on('state', state => state === 'running' && resolve())); | ||
yield new Promise(resolve => _this6.once('running', () => resolve())); | ||
})(); | ||
@@ -263,5 +266,4 @@ } | ||
yield _this7._waitForPrimary(admin); | ||
_this7._state = 'running'; | ||
_this7.emit('state', 'running'); | ||
_this7.emit(_this7._state = 'running'); | ||
@@ -268,0 +270,0 @@ _this7.debug('running'); |
{ | ||
"name": "mongodb-memory-server", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "In-memory MongoDB Server. Designed with testing in mind, the server will allow you to connect your favourite ODM or client library to the MongoDB Server and run integration tests isolated from each other.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
135872
2035