-
-
Save TheSavior/6f9d35da0c67a53d584d2bc38b13f320 to your computer and use it in GitHub Desktop.
Node process unhandled rejection
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
it('should fail', function() { | |
Promise.reject(new Error('unhandled rejection')); | |
}); | |
process.on('unhandledRejection', (reason) => { | |
console.error(reason); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment