This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unit Test: | |
describe('check unhandled exceptions', () => { | |
it ('should log error and exit if unhandled exception is caught', ()=> { | |
let options = { | |
log: console.log, | |
err: console.error }; | |
let errSpy = sinon.spy(options, 'err'); | |
let expOut = "Server has crashed with Error: We Crashed!"; | |
app.crash(); |