MCPcopy
hub / github.com/Koenkk/zigbee2mqtt / mockClear

Function mockClear

test/extensions/bind.test.ts:32–41  ·  view source on GitHub ↗
(device: Device)

Source from the content-addressed store, hash-verified

30 };
31
32 const mockClear = (device: Device): void => {
33 for (const endpoint of device.endpoints) {
34 endpoint.read.mockClear();
35 endpoint.write.mockClear();
36 endpoint.configureReporting.mockClear();
37 endpoint.bind = vi.fn();
38 endpoint.bind.mockClear();
39 endpoint.unbind.mockClear();
40 }
41 };
42
43 beforeAll(async () => {
44 vi.useFakeTimers();

Callers 1

bind.test.tsFile · 0.70

Calls 1

mockClearMethod · 0.45

Tested by

no test coverage detected