Skip to content

Commit 0a17c90

Browse files
committed
test: added failing test
1 parent 3645741 commit 0a17c90

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/socket.io.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,19 @@ describe('socket.io', function(){
15051505
});
15061506
});
15071507
});
1508+
1509+
it('should not crash with raw binary', function(done){
1510+
var srv = http();
1511+
var sio = io(srv);
1512+
srv.listen(function(){
1513+
var socket = client(srv);
1514+
sio.on('connection', function(s){
1515+
s.conn.on('upgrade', function(){
1516+
s.conn.write('5woooot');
1517+
});
1518+
});
1519+
});
1520+
});
15081521
});
15091522

15101523
describe('messaging many', function(){
@@ -1827,7 +1840,6 @@ describe('socket.io', function(){
18271840
});
18281841
});
18291842
});
1830-
18311843
});
18321844

18331845
describe('middleware', function(done){

0 commit comments

Comments
 (0)