There was an error while loading. Please reload this page.
LearnBoost seems to create a new server for every test! (https://github.com/LearnBoost/engine.io/blob/master/test/engine.io.js)
it "should attach engine to an http server", (done) -> server = http.createServer() engine = eio.attach(server) server.listen 4000, -> request.get "http://localhost:4000/engine.io", (err, res) -> expect(res.status).to.be 500 server.once "close", done server.close()
You need to create a mock request that extends EventEmitter: