Skip to content

Instantly share code, notes, and snippets.

@TheSavior
Last active November 3, 2016 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TheSavior/6f9d35da0c67a53d584d2bc38b13f320 to your computer and use it in GitHub Desktop.
Save TheSavior/6f9d35da0c67a53d584d2bc38b13f320 to your computer and use it in GitHub Desktop.
Node process unhandled rejection
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