test: fixed close flag

This commit is contained in:
Guillermo Rauch
2014-02-09 08:51:16 -08:00
parent 2b0b281f68
commit fd37233821

View File

@@ -13,13 +13,13 @@ describe('Socket', function () {
});
describe('socketClosing', function(){
it('should not emit close on incorrect connection', function (done) {
it('should emit close on incorrect connection', function(done){
var socket = new eio.Socket('ws://0.0.0.0:8080');
var closed = false;
socket.once('error', function(){
setTimeout(function(){
expect(closed).to.be(false);
expect(closed).to.be(true);
done();
}, 20);
});