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

add one line of coverage in log tests.

This commit is contained in:
Simon Hailes 2019-11-02 13:21:58 +00:00
parent c54509df3d
commit 5e9e523d4c

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");
});