summaryrefslogtreecommitdiff
path: root/test/parallel/test-zlib-params.js
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2016-01-25 15:00:06 -0800
committerJames M Snell <jasnell@gmail.com>2016-03-16 08:34:02 -0700
commit85ab4a5f1281c4e1dd06450ac7bd3250326267fa (patch)
tree7a51edfc5d6efc231cf821d575c9ca4a26d0545f /test/parallel/test-zlib-params.js
parent90a5fc20be22b4278a01bc58acba0cb732da0140 (diff)
downloadandroid-node-v8-85ab4a5f1281c4e1dd06450ac7bd3250326267fa.tar.gz
android-node-v8-85ab4a5f1281c4e1dd06450ac7bd3250326267fa.tar.bz2
android-node-v8-85ab4a5f1281c4e1dd06450ac7bd3250326267fa.zip
buffer: add .from(), .alloc() and .allocUnsafe()
Several changes: * Soft-Deprecate Buffer() constructors * Add `Buffer.from()`, `Buffer.alloc()`, and `Buffer.allocUnsafe()` * Add `--zero-fill-buffers` command line option * Add byteOffset and length to `new Buffer(arrayBuffer)` constructor * buffer.fill('') previously had no effect, now zero-fills * Update the docs PR-URL: https://github.com/nodejs/node/pull/4682 Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Diffstat (limited to 'test/parallel/test-zlib-params.js')
-rw-r--r--test/parallel/test-zlib-params.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parallel/test-zlib-params.js b/test/parallel/test-zlib-params.js
index 4e02b7bdb9..db2d387916 100644
--- a/test/parallel/test-zlib-params.js
+++ b/test/parallel/test-zlib-params.js
@@ -12,7 +12,7 @@ const deflater = zlib.createDeflate(opts);
const chunk1 = file.slice(0, chunkSize);
const chunk2 = file.slice(chunkSize);
-const blkhdr = new Buffer([0x00, 0x48, 0x82, 0xb7, 0x7d]);
+const blkhdr = Buffer.from([0x00, 0x48, 0x82, 0xb7, 0x7d]);
const expected = Buffer.concat([blkhdr, chunk2]);
let actual;