mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
more tests for log and Node
This commit is contained in:
@@ -483,6 +483,18 @@ describe('Node', function() {
|
||||
Log.log.restore();
|
||||
done();
|
||||
});
|
||||
it('returns not defined if eventname defined', function(done) {
|
||||
var n = new RedNode({id:'123',type:'abc'});
|
||||
var loginfo = {};
|
||||
sinon.stub(Log, 'log', function(msg) {
|
||||
loginfo = msg;
|
||||
});
|
||||
var msg = {payload:"foo", _msgid:"987654321"};
|
||||
var m = n.metric("info",msg,"15mb");
|
||||
should(m).be.undefined;
|
||||
Log.log.restore();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
describe('#status', function() {
|
||||
|
Reference in New Issue
Block a user