/** * Expose `eio` global. */ global.eio = require('../index'); /** * Expose client. */ global.eioc = require('engine.io-client'); /** * Expose `request` global. */ global.request = require('superagent'); /** * Expose `expect` global */ global.expect = require('expect.js'); /** * Listen shortcut that fires a callback on an epheemal port. */ global.listen = function (opts, fn) { if ('function' == typeof opts) { fn = opts; opts = {}; } var e = global.eio.listen(null, opts, function () { fn(e.httpServer.address().port); }); return e; }; /** * Sprintf util. */ require('s').extend();