summaryrefslogtreecommitdiff
path: root/test/parallel/test-stream2-compatibility.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-stream2-compatibility.js')
-rw-r--r--test/parallel/test-stream2-compatibility.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/parallel/test-stream2-compatibility.js b/test/parallel/test-stream2-compatibility.js
index 2d62d63907..7731245659 100644
--- a/test/parallel/test-stream2-compatibility.js
+++ b/test/parallel/test-stream2-compatibility.js
@@ -10,8 +10,7 @@ var ondataCalled = 0;
function TestReader() {
R.apply(this);
- this._buffer = new Buffer(100);
- this._buffer.fill('x');
+ this._buffer = Buffer.alloc(100, 'x');
this.on('data', function() {
ondataCalled++;
@@ -22,7 +21,7 @@ util.inherits(TestReader, R);
TestReader.prototype._read = function(n) {
this.push(this._buffer);
- this._buffer = new Buffer(0);
+ this._buffer = Buffer.alloc(0);
};
var reader = new TestReader();