Skip to content

Commit

Permalink
Fix tcprequest deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Oct 21, 2021
1 parent fa51b06 commit 21304a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/nodes/core/network/31-tcprequest_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand Down

0 comments on commit 21304a6

Please sign in to comment.