const uuid = require('uuid'); const client = require('../lib/dist'); const allCredentials = new client.UserCredentials("admin", "changeit"); function delay(ms) { return new Promise(function (resolve, reject) { setTimeout(resolve, ms); }) } function delayOnlyFirst(count, action) { if (count === 0) return action(); return delay(200) .then(function () { action(); }) } module.exports = { 'Test Subscribe To All Happy Path': function(test) { const resolveLinkTos = false; const numberOfPublishedEvents = 5; test.expect(numberOfPublishedEvents + 4); var _doneCount = 0; function done(err) { test.ok(!err, err ? err.stack : ''); if (++_doneCount < 2) return; test.done(); } var publishedEvents = []; for(var i=0;i