From 21304a695c3450fbf80cee69c84fe71ce753b076 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Thu, 21 Oct 2021 09:40:25 +0100 Subject: [PATCH] Fix tcprequest deprecation warnings --- test/nodes/core/network/31-tcprequest_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/nodes/core/network/31-tcprequest_spec.js b/test/nodes/core/network/31-tcprequest_spec.js index 69ae9ad36..dc0755c1b 100644 --- a/test/nodes/core/network/31-tcprequest_spec.js +++ b/test/nodes/core/network/31-tcprequest_spec.js @@ -60,9 +60,9 @@ describe('TCP Request Node', function() { n2.on("input", function(msg) { try { if (typeof val1 === 'object') { - msg.should.have.properties(Object.assign({}, val1, {payload: Buffer(val1.payload)})); + msg.should.have.properties(Object.assign({}, val1, {payload: Buffer.from(val1.payload)})); } else { - msg.should.have.property('payload', Buffer(val1)); + msg.should.have.property('payload', Buffer.from(val1)); } done(); } catch(err) { @@ -84,9 +84,9 @@ describe('TCP Request Node', function() { n2.on("input", msg => { try { if (typeof result === 'object') { - msg.should.have.properties(Object.assign({}, result, {payload: Buffer(result.payload)})); + msg.should.have.properties(Object.assign({}, result, {payload: Buffer.from(result.payload)})); } else { - msg.should.have.property('payload', Buffer(result)); + msg.should.have.property('payload', Buffer.from(result)); } done(); } catch(err) {