Update zigbee-herdsman and zigbee-herdsman-converters.

This commit is contained in:
Koen Kanters committed 2019-10-07 19:34:10 +02:00
1 parent 41c8c2a146
commit a3bbb93f99
9 files changed
+23 -18

No files matched your search

+6 -4
View File
@@ -114,14 +114,16 @@ describe('Bridge config', () => {
});
it('Should allow to reset', async () => {
zigbeeHerdsman.softReset.mockClear();
zigbeeHerdsman.reset.mockClear();
MQTT.events.message('zigbee2mqtt/bridge/config/reset', '');
await flushPromises();
expect(zigbeeHerdsman.softReset).toHaveBeenCalledTimes(1);
zigbeeHerdsman.softReset.mockImplementationOnce(() => {throw new Error('')});
expect(zigbeeHerdsman.reset).toHaveBeenCalledTimes(1);
expect(zigbeeHerdsman.reset).toHaveBeenCalledWith('soft');
zigbeeHerdsman.reset.mockImplementationOnce(() => {throw new Error('')});
MQTT.events.message('zigbee2mqtt/bridge/config/reset', '');
await flushPromises();
expect(zigbeeHerdsman.softReset).toHaveBeenCalledTimes(2);
expect(zigbeeHerdsman.reset).toHaveBeenCalledTimes(2);
expect(zigbeeHerdsman.reset.mock.calls[1][0]).toBe('soft');
});
it('Should allow to set last_seen', async () => {
+1 -1
View File
@@ -151,7 +151,7 @@ const mock = {
return Object.values(groups).find((d) => d.groupID === groupID);
}),
getPermitJoin: jest.fn().mockReturnValue(false),
softReset: jest.fn(),
reset: jest.fn(),
createGroup: jest.fn().mockImplementation((groupID) => {
const group = new Group(groupID);
groups[`group_${groupID}`] = group