diff options
Diffstat (limited to 'test/pummel/test-stream2-basic.js')
-rw-r--r-- | test/pummel/test-stream2-basic.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/pummel/test-stream2-basic.js b/test/pummel/test-stream2-basic.js index 564a3f7f42..e03c49f13b 100644 --- a/test/pummel/test-stream2-basic.js +++ b/test/pummel/test-stream2-basic.js @@ -8,8 +8,7 @@ var EE = require('events').EventEmitter; function TestReader(n) { R.apply(this); - this._buffer = new Buffer(n || 100); - this._buffer.fill('x'); + this._buffer = Buffer.alloc(n || 100, 'x'); this._pos = 0; this._bufs = 10; } @@ -383,7 +382,7 @@ test('read(0) for ended streams', function(t) { var ended = false; r._read = function(n) {}; - r.push(new Buffer('foo')); + r.push(Buffer.from('foo')); r.push(null); var v = r.read(0); @@ -435,7 +434,7 @@ test('adding readable triggers data flow', function(t) { if (readCalled++ === 2) r.push(null); else - r.push(new Buffer('asdf')); + r.push(Buffer.from('asdf')); }; r.on('readable', function() { |