diff --git a/test/frame.js b/test/frame.js index 26ac3b10..9b47f95c 100644 --- a/test/frame.js +++ b/test/frame.js @@ -123,7 +123,7 @@ suite("Parsing", function() { bufs.push(defs.encodeMethod(f.id, 0, f.fields)); }); - partition(bufs).forEach(input.write.bind(input)); + partition(bufs).forEach(function (chunk) { input.write(chunk); }); frames.acceptLoop(); if (ex) throw ex; return i === t.length; diff --git a/test/mux.js b/test/mux.js index a0befcec..b785ac05 100644 --- a/test/mux.js +++ b/test/mux.js @@ -41,7 +41,7 @@ test("single input", function(done) { // not 0, it's treated specially by PassThrough for some reason. By // 'specially' I mean it breaks the stream. See e.g., // https://github.com/isaacs/readable-stream/pull/55 - data.forEach(input.write.bind(input)); + data.forEach(function (chunk) { input.write(chunk); }); readAllObjects(output, function(vals) { assert.deepEqual(data, vals); @@ -75,7 +75,7 @@ test("single input, resuming stream", function(done) { return val; } - data.forEach(input.write.bind(input)); + data.forEach(function (chunk) { input.write(chunk); }); readAllObjects(output, function(vals) { assert.deepEqual([1,2,3,4,6,7,8,9], vals); @@ -145,13 +145,13 @@ test("unpipe", function(done) { mux.pipeFrom(input); schedule(function() { - pipedData.forEach(input.write.bind(input)); + pipedData.forEach(function (chunk) { input.write(chunk); }); schedule(function() { mux.unpipeFrom(input); schedule(function() { - unpipedData.forEach(input.write.bind(input)); + unpipedData.forEach(function(chunk) { input.write(chunk); }); input.end(); schedule(function() { // exhaust so that 'end' fires