add one line of coverage in log tests.

pull/2366/head
Simon Hailes 2019-11-02 13:21:58 +00:00
parent c54509df3d
commit 5e9e523d4c
1 changed files with 10 additions and 0 deletions

View File

@ -236,6 +236,16 @@ describe("@node-red/util/log", function() {
msg.msg.constructor = { name: "strangeobj" };
var ret = log.info(msg.msg);
});
it('it can log an object but use .message', function() {
var msg = {
msg: {
message: "my special message",
mystrangeobj:"hello",
},
};
var ret = log.info(msg.msg);
sinon.assert.calledWithMatch(util.log,"my special message");
});