Skip to content

Instantly share code, notes, and snippets.

@carlosmarte
Created September 16, 2017 19:17
Show Gist options
  • Save carlosmarte/09457e5cf575b936d1e3813d49f77aa1 to your computer and use it in GitHub Desktop.
Save carlosmarte/09457e5cf575b936d1e3813d49f77aa1 to your computer and use it in GitHub Desktop.
// cheesy hackaround for test deps (read: nock) that rely on setImmediate
if (!global.setImmediate || !require('timers').setImmediate) {
require('timers').setImmediate = global.setImmediate = function () {
var args = [arguments[0], 0].concat([].slice.call(arguments, 1))
setTimeout.apply(this, args)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment