Skip to content

Instantly share code, notes, and snippets.

@nicokruger
Created February 29, 2012 07:30
async-better
before(function (done) {
server.server(options, function (s, db, providers) {
synchelper.waitForAll(
function () {
s.listen();
done();
},
function (callback) { db.notification.remove({}, callback); },
function (callback) { providers.provider1.insertBulk([item1, item2, item3], callback); },
function (callback) { providers.provider2.insertBulk([item1, item2, item3], callback); },
function (callback) { providers.provider3.insertBulk([item1, item2, item3], callback); },
function (callback) { providers.provider4.insertBulk([item1, item2, item3], callback); }
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment