mcgraths
2/29/2012 - 7:30 AM

async-better

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); }
            );
        });
});