Catch exception when removing device via pass/blocklist. https://github.com/Koenkk/zigbee2mqtt/issues/9116

This commit is contained in:
Koen Kanters
2021-10-14 22:18:37 +02:00
parent ad5cda4d40
commit f7c0b46bef
2 changed files with 10 additions and 2 deletions
+1
View File
@@ -174,6 +174,7 @@ describe('Controller', () => {
it('Should remove device not on passlist on startup', async () => {
settings.set(['passlist'], [zigbeeHerdsman.devices.bulb_color.ieeeAddr]);
zigbeeHerdsman.devices.bulb.removeFromNetwork.mockImplementationOnce(() => {throw new Error("dummy")});
await controller.start();
await flushPromises();
expect(zigbeeHerdsman.devices.bulb_color.removeFromNetwork).toHaveBeenCalledTimes(0);