JSFiddle - React, Tailwind, and code Playground
by frosas
HTML
<script src="http://rawgithub.com/kriskowal/q/master/q.js"></script>
JavaScript
window.Touch = undefined // Make it work on Chrome
Q.reject("Handled").catch(function() {})
var promise = Q.reject("Handled after a while")
setTimeout(function() { promise.catch(function() {}) }, 1000)
Q.reject("Unhandled")
/*
# Expected result
[Q] Unhandled rejection reasons (should be empty): ["(no stack) Unhandled"]
# Result in Chrome
[Q] Unhandled rejection reasons (should be empty): ["(no stack) Handled"]
# Result in Firefox
[Q] Unhandled rejection reasons (should be empty): ["(no stack) Handled after a while", "(no stack) Unhandled"]
# Result in Safari
[Q] Unhandled rejection reasons (should be empty): ["(no stack) Handled after a while", "(no stack) Unhandled"]
*/