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(() => {