mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Adjust test to use proper data types and to only run for supporting browsers when testing the memory leak fix
This commit is contained in:
@@ -192,11 +192,15 @@ module.exports = function(parser) {
|
||||
expect(packet).to.eql(err);
|
||||
expect(isLast).to.eql(true);
|
||||
});
|
||||
decPayload(new Buffer([64]), function (packet, index, total) {
|
||||
var isLast = index + 1 == total;
|
||||
expect(packet).to.eql(err);
|
||||
expect(isLast).to.eql(true);
|
||||
});
|
||||
|
||||
if ('undefined' == typeof window || window.Int8Array) {
|
||||
var data = 'undefined' !== typeof window ? (new Int8Array([64])).buffer : new Buffer([64]);
|
||||
decPayload(data, function (packet, index, total) {
|
||||
var isLast = index + 1 == total;
|
||||
expect(packet).to.eql(err);
|
||||
expect(isLast).to.eql(true);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it('should err on bad payload length', function () {
|
||||
|
||||
Reference in New Issue
Block a user