Skip to content

Commit

Permalink
Fix browser test buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
davedoesdev committed Jun 10, 2016
1 parent 979dca7 commit 9878021
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ function test(ServerBPMux, make_server, end_server, end_server_conn,

function large_buffer(sender, receiver, cb)
{
var buf = new Buffer(32 * 1024), bufs = [], count = 0;
var buf = make_buffer(sender, 32 * 1024), bufs = [], count = 0;
buf.fill('a');

receiver.on('readable', function ()
Expand All @@ -382,7 +382,7 @@ function test(ServerBPMux, make_server, end_server, end_server_conn,
count += data.length;
if (count === buf.length)
{
expect(Buffer.concat(bufs).toString()).to.equal(buf.toString());
expect(buffer_concat(receiver, bufs).toString()).to.equal(buf.toString());
cb();
}
else if (count > buf.length)
Expand Down

0 comments on commit 9878021

Please sign in to comment.