mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Adding logging & metric recording configuration via settings
This commit is contained in:
@@ -136,7 +136,7 @@ describe('html node', function() {
|
||||
n1.receive({payload:null,topic: "bar"});
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "log";
|
||||
return evt[0].level == "info";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
// Each logEvent is the array of args passed to the function.
|
||||
|
@@ -82,7 +82,7 @@ describe('JSON node', function() {
|
||||
jn1.receive({payload:'foo',topic: "bar"});
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "log";
|
||||
return evt[0].level == "info";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
logEvents[0][0].should.have.a.property('msg',"SyntaxError: Unexpected token o"+ "\nfoo");
|
||||
@@ -104,7 +104,7 @@ describe('JSON node', function() {
|
||||
jn1.receive({payload:1,topic: "bar"});
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "log";
|
||||
return evt[0].level == "info";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
logEvents[0][0].should.have.a.property('msg',"dropped: 1");
|
||||
|
@@ -111,7 +111,7 @@ describe('XML node', function() {
|
||||
try {
|
||||
helper.log().called.should.be.true;
|
||||
var logEvents = helper.log().args.filter(function(evt) {
|
||||
return evt[0].level == "log";
|
||||
return evt[0].level == "info";
|
||||
});
|
||||
logEvents.should.have.length(1);
|
||||
logEvents[0][0].should.have.a.property('msg',"This node only handles xml strings or js objects.");
|
||||
|
Reference in New Issue
Block a user