mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
14 lines
512 B
JavaScript
14 lines
512 B
JavaScript
const logger = require('../lib/util/logger');
|
|
|
|
module.exports = {
|
|
stubLogger: (jest) => {
|
|
jest.spyOn(logger, 'info').mockReturnValue(undefined);
|
|
jest.spyOn(logger, 'warn').mockReturnValue(undefined);
|
|
jest.spyOn(logger, 'debug').mockReturnValue(undefined);
|
|
jest.spyOn(logger, 'error').mockReturnValue(undefined);
|
|
},
|
|
zigbeeMessage: (device, cid, type, data, epId, groupid=0) => {
|
|
return {data: {cid, data}, type, groupid, endpoints: [{device, epId}]};
|
|
},
|
|
};
|