Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
browser unhandled listener
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