mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix tcprequest deprecation warnings
This commit is contained in:
parent
fa51b06c46
commit
21304a695c
@ -60,9 +60,9 @@ describe('TCP Request Node', function() {
|
|||||||
n2.on("input", function(msg) {
|
n2.on("input", function(msg) {
|
||||||
try {
|
try {
|
||||||
if (typeof val1 === 'object') {
|
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 {
|
} else {
|
||||||
msg.should.have.property('payload', Buffer(val1));
|
msg.should.have.property('payload', Buffer.from(val1));
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
@ -84,9 +84,9 @@ describe('TCP Request Node', function() {
|
|||||||
n2.on("input", msg => {
|
n2.on("input", msg => {
|
||||||
try {
|
try {
|
||||||
if (typeof result === 'object') {
|
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 {
|
} else {
|
||||||
msg.should.have.property('payload', Buffer(result));
|
msg.should.have.property('payload', Buffer.from(result));
|
||||||
}
|
}
|
||||||
done();
|
done();
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user