summaryrefslogtreecommitdiff
path: root/test/parallel/test-string-decoder-end.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/parallel/test-string-decoder-end.js')
-rw-r--r--test/parallel/test-string-decoder-end.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-string-decoder-end.js b/test/parallel/test-string-decoder-end.js
index a064250dcd..e13ddcb167 100644
--- a/test/parallel/test-string-decoder-end.js
+++ b/test/parallel/test-string-decoder-end.js
@@ -9,7 +9,7 @@ var SD = require('string_decoder').StringDecoder;
var encodings = ['base64', 'hex', 'utf8', 'utf16le', 'ucs2'];
var bufs = [ '☃💩', 'asdf' ].map(function(b) {
- return new Buffer(b);
+ return Buffer.from(b);
});
// also test just arbitrary bytes from 0-15.
@@ -17,7 +17,7 @@ for (var i = 1; i <= 16; i++) {
var bytes = new Array(i).join('.').split('.').map(function(_, j) {
return j + 0x78;
});
- bufs.push(new Buffer(bytes));
+ bufs.push(Buffer.from(bytes));
}
encodings.forEach(testEncoding);