why are you doing this try catch ? you mock out the process.exit, no ? and expect(mock.process.exit).to.have.been.called