Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// Optional `options. Stuff like retry count, ramp-up, etc.
// should have sane defaults.
var wait = waitforit(options, function (cb) {
// This would be the 'test' function.
// cb(true) when 'it' is done.
wait.on('ready', function () {
// Do something because the test condition passed.
wait.on('timeout', function () {
// We got past the max retries or max total time or w/e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.