Create/destroy event listeners

mocha loads all the tests in same process. This means that when
we start a new test, the old state still persists. For event
listeners, this means that they get multiple duplicate event handlers.
This commit is contained in:
Girish Ramakrishnan
2017-02-07 10:30:52 -08:00
parent 4bb864e2ac
commit b91674799b
7 changed files with 99 additions and 41 deletions
+1
View File
@@ -88,6 +88,7 @@ describe('apptask', function () {
async.series([
database.initialize,
appdb.add.bind(null, APP.id, APP.appStoreId, APP.manifest, APP.location, APP.portBindings, APP),
settings.initialize,
settings.setDnsConfig.bind(null, { provider: 'route53', accessKeyId: 'accessKeyId', secretAccessKey: 'secretAccessKey', endpoint: 'http://localhost:5353' }, config.fqdn()),
settings.setTlsConfig.bind(null, { provider: 'caas' })
], done);