From e21fe7a2d1e0f1d375e07c0170ac40199b83e912 Mon Sep 17 00:00:00 2001 From: Francis Gulotta Date: Fri, 20 Jul 2018 23:54:23 -0400 Subject: [PATCH] fix: Remove a new Buffer() call (#1603) --- test/serialport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/serialport.js b/test/serialport.js index 5c2f853bf..c492249af 100644 --- a/test/serialport.js +++ b/test/serialport.js @@ -14,7 +14,7 @@ describe('SerialPort', () => { beforeEach(() => { SerialPort.Binding = mockBinding; sandbox = sinon.createSandbox(); - mockBinding.createPort('/dev/exists', { echo: true, readyData: new Buffer(0) }); + mockBinding.createPort('/dev/exists', { echo: true, readyData: Buffer.from([]) }); }); afterEach(() => {