Skip to content

Instantly share code, notes, and snippets.

@nicokruger
Created February 29, 2012 07:09
Show Gist options
  • Select an option

  • Save nicokruger/1938756 to your computer and use it in GitHub Desktop.

Select an option

Save nicokruger/1938756 to your computer and use it in GitHub Desktop.
async-callback-bad
before(function (done) {
server.server(options, function (s, db, providers) {
//clear db and add a test user - "testuser"
db.user.remove({}, function () {
db.notification.remove({}, function () {
providers.provider1.insertBulk(item1, item2, item3],
function (err, result) {
providers.provider2.insert([item1, item2, item3]
function (err, result) {
providers.provider3.insert([item1, item2, item3]
function (err, result) {
providers.provider4.insert([item1, item2, item3],
function (err, result) {
s.listen();
done();
})
});
});
});
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment