Added test encoding a payload test

This commit is contained in:
Guillermo Rauch
2011-08-02 10:53:56 -07:00
parent 89506b324f
commit 15414cba65

View File

@@ -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();
});
}
};