Skip to content

Commit

Permalink
try fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petkaantonov committed Oct 15, 2019
1 parent a00a664 commit 2378ee6
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions src/debuggability.js
Expand Up @@ -46,23 +46,7 @@ var deferUnhandledRejectionCheck;
promises.length = 0;
}

if (util.isNode) {
deferUnhandledRejectionCheck = (function() {
var timers = require("timers");
var timerSetTimeout = timers.setTimeout;
var timer = timerSetTimeout(unhandledRejectionCheck, 1);
timer.unref();

return function(promise) {
promises.push(promise);
if (typeof timer.refresh === "function") {
timer.refresh();
} else {
timerSetTimeout(unhandledRejectionCheck, 1).unref();
}
};
})();
} else if (typeof document === "object" && document.createElement) {
if (typeof document === "object" && document.createElement) {
deferUnhandledRejectionCheck = (function() {
var iframeSetTimeout;

Expand Down

0 comments on commit 2378ee6

Please sign in to comment.