Skip to content

Commit

Permalink
test: added test for event emitting with send
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Dec 18, 2012
1 parent 3038ce5 commit 6b3cdd7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/socket.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,5 +250,20 @@ describe('socket.io', function(){
});
});
});

it('should emit message events through `send`', function(done){
var srv = http();
var sio = io(srv);
srv.listen(function(){
var socket = client(srv);
socket.on('message', function(a){
expect(a).to.be('a');
done();
});
sio.on('connection', function(s){
s.send('a');
});
});
});
});
});

0 comments on commit 6b3cdd7

Please sign in to comment.