Created
October 27, 2017 09:40
-
-
Save Kmaschta/ebc88d7cc48120593bfada12d7e67feb to your computer and use it in GitHub Desktop.
Prevent unhandled Promise rejection errors
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
// Warn from unhandled promise rejection that can occurs without failing tests | |
// jest --setupFiles setup-tests.js | |
process.on('unhandledRejection', (error, promise) => { | |
console.error('Unhandled Rejection at:', promise, `\n${error.stack}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment