(device: Device)
| 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(); |