1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Update debug_spec for format changes

This commit is contained in:
Nick O'Leary 2016-10-27 16:59:16 +01:00
parent 9555e296a2
commit 8167f623e3

View File

@ -194,7 +194,7 @@ describe('debug node', function() {
}, function(msg) { }, function(msg) {
JSON.parse(msg).should.eql({ JSON.parse(msg).should.eql({
topic:"debug", topic:"debug",
data:{id:"n1",msg: '[\n 0,\n 1,\n 2,\n 3\n]',format:"array [4]", data:{id:"n1",msg: '[\n 0,\n 1,\n 2,\n 3\n]',format:"array[4]",
property:"payload"} property:"payload"}
}); });
}, done); }, done);
@ -222,7 +222,7 @@ describe('debug node', function() {
}); });
}); });
it('should truncated a long message', function(done) { it('should truncate a long message', function(done) {
var flow = [{id:"n1", type:"debug" }]; var flow = [{id:"n1", type:"debug" }];
helper.load(debugNode, flow, function() { helper.load(debugNode, flow, function() {
var n1 = helper.getNode("n1"); var n1 = helper.getNode("n1");
@ -234,7 +234,7 @@ describe('debug node', function() {
topic:"debug", topic:"debug",
data:{ data:{
id:"n1", id:"n1",
msg: Array(1001).join("X")+' ....', msg: Array(1001).join("X")+'...',
property:"payload", property:"payload",
format:"string [1001]" format:"string [1001]"
} }
@ -256,7 +256,7 @@ describe('debug node', function() {
id:"n1", id:"n1",
msg: '48454c4c4f', msg: '48454c4c4f',
property:"payload", property:"payload",
format: "buffer [5]" format: "buffer[5]"
} }
}); });
}, done); }, done);