Commit d4858569 authored by Sergey Dmitriev's avatar Sergey Dmitriev

fix test

parent fffa9c8c
...@@ -523,13 +523,14 @@ describe('agi#createServer', function() { ...@@ -523,13 +523,14 @@ describe('agi#createServer', function() {
var net = require('net'); var net = require('net');
var server = (new agi()).start(3000); var server = (new agi()).start(3000);
expect(server instanceof net.Server).ok(); expect(server instanceof net.Server).ok();
}); });
it('invokes callback when a new connection is established', function(done) { it('invokes callback when a new connection is established', function(done) {
var server = new agi(function(context) { var server = new agi(function(context) {
expect(context instanceof Context); expect(context instanceof Context);
done(); done();
}).start(3000); }).start(3001);
server.emit('connection', new MemoryStream()); server.emit('connection', new MemoryStream());
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment