mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-26 20:50:07 +00:00
Improve tests.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
const logger = require('../lib/util/logger');
|
||||
|
||||
module.exports = {
|
||||
stubLogger: (sandbox) => {
|
||||
sandbox.stub(logger, 'info').callsFake(() => {});
|
||||
sandbox.stub(logger, 'warn').callsFake(() => {});
|
||||
sandbox.stub(logger, 'debug').callsFake(() => {});
|
||||
sandbox.stub(logger, 'error').callsFake(() => {});
|
||||
},
|
||||
zigbeeMessage: (device, cid, type, data) => {
|
||||
return {data: {cid: cid, data: data}, type: type, endpoints: [{device: device}]};
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user