mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Added test encoding a payload test
This commit is contained in:
@@ -320,6 +320,28 @@
|
||||
socket.disconnect();
|
||||
next();
|
||||
});
|
||||
},
|
||||
|
||||
'test encoding a payload': function (next) {
|
||||
var socket = create('/woot');
|
||||
|
||||
socket.on('error', function (msg) {
|
||||
throw new Error(msg || 'Received an error');
|
||||
});
|
||||
|
||||
socket.on('connect', function () {
|
||||
socket.socket.setBuffer(true);
|
||||
socket.send('ñ');
|
||||
socket.send('ñ');
|
||||
socket.send('ñ');
|
||||
socket.send('ñ');
|
||||
socket.socket.setBuffer(false);
|
||||
});
|
||||
|
||||
socket.on('done', function () {
|
||||
socket.disconnect();
|
||||
next();
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user