-
-
Save TheSavior/35e6ebea11f20d9196dcb86c86ed3ea5 to your computer and use it in GitHub Desktop.
Use karma error func
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) { | |
window.__karma__.error(err.reason.stack); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment