+ 'which closes the db connection', (done) => { diehard.register.callsArgWithAsync(0, () => { assert.ok(connectionStub.close.calledOnce); done(); }); db.connect(); });
+ 'which closes the queue connection', (done) => { const expecteMsg = 'RabbitMQ connection disconnected due to app termination'; sandbox.stub(logger, 'logInfo'); diehard.register.callsArgWithAsync(0, () => { assert.ok(logger.logInfo.calledWith(expecteMsg)); done(); }); queue.createConnection(); });