chore: Avoid using deprecated Buffer constructor (#1510)

safe-buffer is already used and provides Buffer.alloc polyfill, so
just use Buffer.alloc directly to avoid hitting deprecated API.

Refs:
https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
This commit is contained in:
Сковорода Никита Андреевич 2018-03-03 02:27:44 +03:00 • committed by Francis Gulotta
parent 45b3a2feb5
commit 0c1533b825

View file

@ -17,7 +17,7 @@ class MockBinding extends BaseBinding {
this.isOpen = false;
this.port = null;
this.lastWrite = null;
this.recording = new Buffer(0);
this.recording = Buffer.alloc(0);
this.writeOperation = null; // in flight promise or null
}