summaryrefslogtreecommitdiff
path: root/test/parallel/test-buffer-concat.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-buffer-concat.js')
-rw-r--r--test/parallel/test-buffer-concat.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-buffer-concat.js b/test/parallel/test-buffer-concat.js
index 7aec811720..bc628e656b 100644
--- a/test/parallel/test-buffer-concat.js
+++ b/test/parallel/test-buffer-concat.js
@@ -3,9 +3,9 @@ require('../common');
var assert = require('assert');
var zero = [];
-var one = [ new Buffer('asdf') ];
+var one = [ Buffer.from('asdf') ];
var long = [];
-for (var i = 0; i < 10; i++) long.push(new Buffer('asdf'));
+for (var i = 0; i < 10; i++) long.push(Buffer.from('asdf'));
var flatZero = Buffer.concat(zero);
var flatOne = Buffer.concat(one);
@@ -22,10 +22,10 @@ assert(flatLongLen.toString() === (new Array(10 + 1).join('asdf')));
assertWrongList();
assertWrongList(null);
-assertWrongList(new Buffer('hello'));
+assertWrongList(Buffer.from('hello'));
assertWrongList([42]);
assertWrongList(['hello', 'world']);
-assertWrongList(['hello', new Buffer('world')]);
+assertWrongList(['hello', Buffer.from('world')]);
function assertWrongList(value) {
assert.throws(function() {