mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 02:18:31 -07:00
15 lines
576 B
JavaScript
15 lines
576 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);
|
|
jest.spyOn(logger, 'trace').mockReturnValue(undefined);
|
|
},
|
|
zigbeeMessage: (device, cid, type, data, epId, groupid=0) => {
|
|
return {data: {cid, data}, type, groupid, endpoints: [{device, epId}]};
|
|
},
|
|
};
|