Skip to content

Commit

Permalink
fix(ignore): Update test cases for #23328
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Jul 13, 2024
1 parent e3fa0bf commit af7467b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/bridge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2990,11 +2990,15 @@ describe('Bridge', () => {
});

it('Should allow interviewing a device by ieeeAddr', async () => {
const device = controller.zigbee.resolveEntity(zigbeeHerdsman.devices.bulb);
device.resolveDefinition = jest.fn();
MQTT.publish.mockClear();
zigbeeHerdsman.devices.bulb.interview.mockClear();
expect(device.resolveDefinition).toHaveBeenCalledTimes(0);
MQTT.events.message('zigbee2mqtt/bridge/request/device/interview', stringify({id: '0x000b57fffec6a5b2'}));
await flushPromises();
expect(zigbeeHerdsman.devices.bulb.interview).toHaveBeenCalled();
expect(zigbeeHerdsman.devices.bulb.interview).toHaveBeenCalledWith(true);
expect(device.resolveDefinition).toHaveBeenCalledWith(true);
expect(MQTT.publish).toHaveBeenCalledWith(
'zigbee2mqtt/bridge/response/device/interview',
stringify({data: {id: '0x000b57fffec6a5b2'}, status: 'ok'}),
Expand Down

0 comments on commit af7467b

Please sign in to comment.