diff options
Diffstat (limited to 'test/parallel/test-stream2-pipe-error-handling.js')
-rw-r--r-- | test/parallel/test-stream2-pipe-error-handling.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-stream2-pipe-error-handling.js b/test/parallel/test-stream2-pipe-error-handling.js index 7d7cfb6b2b3..65397566c23 100644 --- a/test/parallel/test-stream2-pipe-error-handling.js +++ b/test/parallel/test-stream2-pipe-error-handling.js @@ -10,7 +10,7 @@ var stream = require('stream'); source._read = function(n) { n = Math.min(count, n); count -= n; - source.push(new Buffer(n)); + source.push(Buffer.allocUnsafe(n)); }; var unpipedDest; @@ -50,7 +50,7 @@ var stream = require('stream'); source._read = function(n) { n = Math.min(count, n); count -= n; - source.push(new Buffer(n)); + source.push(Buffer.allocUnsafe(n)); }; var unpipedDest; |