test: test buffer behavior when zeroFill undefined
When ArrayBufferAllocator
has an undefined zeroFill
property,
Buffer.allocUnsafe()
should zero fill.
Refs: https://github.com/nodejs/node/commit/27e84ddd4e1#commitcomment-19182129
The || [0]
(discussed in the Refs: above) is the only piece of code in buffer.js
not covered by tests. Ideally, this test would probably be a C++ addon test, but until someone writes that test, this will at least confirm that the intended behavior is correct.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
test buffer