mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -506,7 +506,7 @@ describe('debug node', function() {
|
||||
helper.load(debugNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
websocket_test(function() {
|
||||
n1.emit("input", {payload: new Buffer.from('HELLO', 'utf8')});
|
||||
n1.emit("input", {payload: Buffer.from('HELLO', 'utf8')});
|
||||
}, function(msg) {
|
||||
JSON.parse(msg).should.eql([{
|
||||
topic:"debug",
|
||||
|
@@ -177,7 +177,7 @@ describe('exec node', function() {
|
||||
function(arg1, arg2, arg3, arg4) {
|
||||
//console.log(arg1);
|
||||
// arg3(error,stdout,stderr);
|
||||
arg3("error",new Buffer([0x01,0x02,0x03,0x88]),new Buffer([0x01,0x02,0x03,0x88]));
|
||||
arg3("error",Buffer.from([0x01,0x02,0x03,0x88]),Buffer.from([0x01,0x02,0x03,0x88]));
|
||||
});
|
||||
helper.load(execNode, flow, function() {
|
||||
var n1 = helper.getNode("n1");
|
||||
@@ -595,7 +595,7 @@ describe('exec node', function() {
|
||||
}
|
||||
catch(err) { done(err); }
|
||||
});
|
||||
n1.receive({payload:new Buffer([0x01,0x02,0x03,0x88])});
|
||||
n1.receive({payload:Buffer.from([0x01,0x02,0x03,0x88])});
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -251,7 +251,7 @@ describe('function node', function() {
|
||||
testNonObjectMessage('return "foo"', done)
|
||||
});
|
||||
it('should drop and log non-object message types - buffer', function(done) {
|
||||
testNonObjectMessage('return new Buffer("hello")', done)
|
||||
testNonObjectMessage('return Buffer.from("hello")', done)
|
||||
});
|
||||
it('should drop and log non-object message types - array', function(done) {
|
||||
testNonObjectMessage('return [[[1,2,3]]]', done)
|
||||
|
Reference in New Issue
Block a user