-
-
Save TheSavior/7b3f01acaa9f00b6fe575bce9fc83760 to your computer and use it in GitHub Desktop.
browser unhandled listener
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 reject', function() { | |
Promise.reject(new Error('unhandled rejection')); | |
}); | |
it('should delay', (done) => { | |
setTimeout(done, 100); | |
}); | |
window.addEventListener('unhandledrejection', function(err) { | |
throw err.reason.stack; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment