it('calls logger.error and process.exit', () => { const err = new Error('foo') logger.error.withArgs('foo') process.exit.withArgs(1) util.logErrorExit1(err) })
it('.logErrorExit1', function () { const err = new Error('foo') util.logErrorExit1(err) expect(process.exit).to.be.calledWith(1) expect(logger.error).to.be.calledWith('foo') })