mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-09 21:41:41 +00:00
14 lines
500 B
JavaScript
14 lines
500 B
JavaScript
const logger = require('../lib/util/logger');
|
|
|
|
module.exports = {
|
|
stubLogger: (jest) => {
|
|
jest.spyOn(logger, 'info').mockImplementation(() => {});
|
|
jest.spyOn(logger, 'warn').mockImplementation(() => {});
|
|
jest.spyOn(logger, 'debug').mockImplementation(() => {});
|
|
jest.spyOn(logger, 'error').mockImplementation(() => {});
|
|
},
|
|
zigbeeMessage: (device, cid, type, data, epId) => {
|
|
return {data: {cid, data}, type, endpoints: [{device, epId}]};
|
|
},
|
|
};
|